I am using some software written in C++ by someone else. They have used the code below to start a batch file (with a token 'EnTmpBase1') that contains my programs. I can run sdbg successfully within the batch file, but when I exit it, it closes and leaves a white rectangle where the window used to be. Behind this, the C++ is still running, but of course, I cannot see the interface or messages that it puts up as these are underneath the white rectangle. The screen does come back at completion of the program.
I presume that there must be a way to get the screen to refresh on exit from sdbg, but can anyone tell me what it is, please?
Thanks
Roger
The code used was:
CreateProcess(NULL, ”cycle.bat EnTmpBase1.db', NULL, NULL, FALSE, 0, NULL, NULL, &si, &pInfo); //Start the process
WaitForSingleObject(pInfo.hProcess, INFINITE); // Halt this program until child process finished
Where si and pInfo are such that:
STARTUPINFO si; //Structure for starting proc
PROCESS_INFORMATION pInfo; //Environment & run info
si.cb = sizeof(si);
si.lpReserved = NULL;
si.lpDesktop = NULL;
si.cbReserved2 = 0;
si.lpReserved2 = NULL;
si.dwFillAttribute = STARTF_USESHOWWINDOW;
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_SHOWMINIMIZED|SW_SHOWNOACTIVATE|SW_SHOWMINNOACTIVE;
and pInfo is filled in by CreateProcess.