进度条控制问题 [英] Progress bar control Problem

查看:71
本文介绍了进度条控制问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个VC ++ MFC应用程序,它有一个进度条控件,我正在点击一个按钮在for循环中重新编写一个文件,我把进度条控制代码setpos放在for循环中并且它正在工作但不要'' t需要这个特定的时间间隔/特别假设25字节的进度条应该递增,所以如何做到这一点请帮助..

I am developing a VC++ MFC application which have one progress bar control and I am reding a file within for loop on click of a button and I put the progress bar control code setpos in the for loop and its working but don''t need this particular time interval/after particular suppose 25 bytes progress bar should be incremented so how to do this please help..

推荐答案

如果你需要显示进度阅读操作(我不确定是否有你)然后你必须事先知道文件的大小,然后正确地增加进度条。

例如,如果文件长度为1000个字节,每读取10个字节,你应该增加一个单元的进度条位置。
If you need to show the progress of the reading operation (I''m not sure I got you) then you have to know, in advance, the size of the file and then increment properly the progress bar.
For instance, if the file is 1000 bytes long then, every 10 bytes read you should increment the progress bar position of one unit.


这篇关于进度条控制问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆