Hello, all!
I've such a problem:
I have a list of projects (VC++ 6.0) that have to be compiled at once - one after another.
For that I've made a dialog that reads the list of projects and starts compilation:
e.g.
It works OK.
But I'd like to have a possibility to stop this process.
So I made a button "Stop" with ID "[tt]IDCANCEL[/tt]" and added an [tt]OnCancel()[/tt] funktion to my dialog.
The problem is that the projects are being compiled one after another and this button doesn't get the event that it was clicked. How can I "refresh" the event queue of the button?
I've such a problem:
I have a list of projects (VC++ 6.0) that have to be compiled at once - one after another.
For that I've made a dialog that reads the list of projects and starts compilation:
e.g.
Code:
char* params = "msdev C:\\MyProjects\\Project1\\build\\win32\\MEASURE_XXX.dsw /MAKE \"MEASURE_XXX - Win32 Release\"";
PROCESS_INFORMATION pi;
ZeroMemory(&pi,sizeof(pi));
STARTUPINFO si;
ZeroMemory(&si,sizeof(si));
si.dwFlags=STARTF_FORCEOFFFEEDBACK|STARTF_USESHOWWINDOW;
si.wShowWindow=SW_HIDE;
si.cb = sizeof(si);
if (!CreateProcess(NULL, pars, NULL, NULL, 0, 0, NULL, NULL, &si, &pi)) {
AfxMessageBox("Error!");
}
WaitForSingleObject(pi.hProcess, INFINITE);
It works OK.
But I'd like to have a possibility to stop this process.
So I made a button "Stop" with ID "[tt]IDCANCEL[/tt]" and added an [tt]OnCancel()[/tt] funktion to my dialog.
The problem is that the projects are being compiled one after another and this button doesn't get the event that it was clicked. How can I "refresh" the event queue of the button?