MFC: Display output of a process asynchronously(concurrently) while process is in execution in a win32 text area (mfc application)

萝らか妹 提交于 2019-12-06 23:44:40

The problem seems the loop to read the pipe is blocking the UI main thread of your application so that your dialog is not updated until the loop finished.

There are some things you can do to solve this problem but the easiest way would be to add a message processing loop to your do-while loop after calling DisplayToTextArea:

 MSG msg;
 while (GetMessage(&msg, NULL, 0, 0)) 
 {
    TranslateMessage(&msg);
    DispatchMessage(&msg);  // send to window proc
 } 
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!