Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dialog recieves no events after starting a new thread

Status
Not open for further replies.

firelex

Programmer
Jan 10, 2002
118
DE
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.
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top