如何在弹出对话框后立即运行功能? [英] How to immediately run funtion after popup dialog box?

查看:67
本文介绍了如何在弹出对话框后立即运行功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有朋友



我是一名新编码员。



我写了一个AutoUpdate MFC程序。

流程:

step1:关闭掌握PGM。

step2:检查PGM版本。

step3:检查其他文件。

step4:打开掌握PGM。

step5:退出更新PGM。

和更新pgm只有一个进度条控件。



因为所有代码都是用OnInitDialog()编写的,当代码运行完成后,弹出更新PGM和进度已经是100%。

这个结果不是我想要的。



我想弹出PGM - >运行代码

不是运行代码 - >弹出窗口PGM



现在我不知道该怎么办?



BR!

谢谢。

Hi,all friends

I am a new coder.

I write a AutoUpdate MFC program.
Process:
step1:close master PGM.
step2:check PGM version.
step3:check other files.
step4:open master PGM.
step5:exit update PGM.
and the update pgm only has a progress bar control.

Because all codes were written in OnInitDialog(),when the codes were run finish,Popup Update PGM and progress already was 100%.
This result is not what I want.

I want popup PGM -> run code
Not is run code -> popup PGM

Now I don't know how to do?

BR!
Thank you.

推荐答案

无论在哪里,都没有autorun功能的概念。仅当某些其他代码调用它时才调用函数。您可能不相信,但它甚至包括功能。



完全取决于您设计软件的功能将在某些事件或任何调用链上调用,或者说,例如,您想要的例外情况。



-SA
There is no such concept of "autorun" of function, no matter where. A function are called only when some other code calls it. You may not believe that, but it includes even the main function.

It's totally up to you to design the software the way the functions would be called on certain events or any chain of calls or, say, exceptions you want to have.

—SA


在OnPaint()代码之后,编写代码!
After OnPaint() code,write code!


这篇关于如何在弹出对话框后立即运行功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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