从其他类的事件更新进度条 [英] Update progress bar from event of other class

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

问题描述



在基于mfc对话框的应用程序中,我编写了一个包含在整个项目中使用的函数的公共类,在该函数中我使用一个参数来增加进度条状态,并且此进度条在父应用程序对话框增加一次并停止;它不显示根据应用程序中的数据发送或接收或变量更新的条形进度。所以我的问题是如何根据应用程序中的数据发送或接收更新进度条?

提前致谢

venkat

Hi,
In mfc dialog based application i write one common class containing functions which are used in overall project,in that functions i take one parameter to increase progress bar status,and this progress bar in parent application dialog which increment once & stops;it not show progress of bar according to data sending or receiving or variable update in application.So my question is how to update progress bar according data send or receive in application?
Thanks in advance
venkat

推荐答案

假设你的意思是 CProgressCtrl [ ^ ],你调用适当的方法来推进条形图作为你的应用程序进展。您可以在发生数据传输的代码中执行此操作,或使用计时器定期检查它。
Assuming you mean a CProgressCtrl[^], you call the appropriate methods to advance the bar as your application progresses. You can do this in the code where the data transfers take place, or use a timer to check it at regular intervals.


这篇关于从其他类的事件更新进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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