[英]c++ MFC execute three consecutive processes with a progress bar
Thank you for reading my post. 感谢您阅读我的帖子。 Here is my problem: 这是我的问题:
I need to install (run) three programs one after the other: P1, P2 and P3. 我需要一个接一个地安装(运行)三个程序:P1,P2和P3。
If P1 is not installed properly, P2 installation will fail. 如果未正确安装P1,则P2安装将失败。
And if P1 and P2 are not installed properly, P3 installation will fail. 如果未正确安装P1和P2,则P3安装将失败。
In addition to this, I need a dialog box which displays a progress bar and shows the progress of the installation: 除此之外,我需要一个对话框,其中显示一个进度条并显示安装进度:
I am using C++ and MFC. 我正在使用C ++和MFC。
I am asking myself whether I should: 我问自己是否应该:
So I have two problems to solve: 所以我有两个问题要解决:
Can you tell me how you would do that? 你能告诉我你会怎么做吗?
Another question I'm asking myself is whether a thread can be used to launch a command like "msiexec"? 我要问自己的另一个问题是,是否可以使用线程来启动“ msiexec”之类的命令?
Best regards. 最好的祝福。
In the dialog box, after creating Pn (n = 1, 2, 3), start a timer which periodically calls GetExitCodeProcess until the exit code is not STILL_ACTIVE
(259); 在对话框中,创建Pn(n = 1、2、3)后,启动一个计时器,该计时器定期调用GetExitCodeProcess,直到退出代码不是STILL_ACTIVE
(259); verify that the exit code is not an error, update the progress bar and start the next process. 确认退出代码不是错误,更新进度条并开始下一个过程。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.