I created a child process in a Windows program with the following code:
PROCESS_INFORMATION info;
memset (&info, 0 , sizeof (info));
STARTUPINFO start;
memset (&start, 0 , sizeof (start));
start.lpReserved = NULL;
start.lpDesktop = "E:\desktop";
start.lpTitle = NULL;
start.dwX = 0;
start.dwY = 0;
start.dwXSize = 0;
start.dwYSize = 0;
start.dwXCountChars = 0;
start.dwYCountChars = 0;
start.dwFillAttribute = 0;
start.dwFlags = 0;
start.wShowWindow = 0;
start.cbReserved2 = 0;
start.lpReserved2 = NULL;
start.hStdInput = NULL;
start.hStdOutput = NULL;
start.hStdError = NULL;
start.cb = sizeof (start);
CreateProcess (NULL, Child_exe, NULL, NULL, FALSE, 0, NULL, NULL, &start, &info);
The child process then calls the message box function several times. When it does I hear the characteristic sound of a message box, Task Manager displays it in the open windows tab, but the box is nowhere to be seen on the screen. I tried fiddling around with the various x and y and wShowWindow members in the STRARTUPINFO struct, but nothing seems to help.
PROCESS_INFORMATION info;
memset (&info, 0 , sizeof (info));
STARTUPINFO start;
memset (&start, 0 , sizeof (start));
start.lpReserved = NULL;
start.lpDesktop = "E:\desktop";
start.lpTitle = NULL;
start.dwX = 0;
start.dwY = 0;
start.dwXSize = 0;
start.dwYSize = 0;
start.dwXCountChars = 0;
start.dwYCountChars = 0;
start.dwFillAttribute = 0;
start.dwFlags = 0;
start.wShowWindow = 0;
start.cbReserved2 = 0;
start.lpReserved2 = NULL;
start.hStdInput = NULL;
start.hStdOutput = NULL;
start.hStdError = NULL;
start.cb = sizeof (start);
CreateProcess (NULL, Child_exe, NULL, NULL, FALSE, 0, NULL, NULL, &start, &info);
The child process then calls the message box function several times. When it does I hear the characteristic sound of a message box, Task Manager displays it in the open windows tab, but the box is nowhere to be seen on the screen. I tried fiddling around with the various x and y and wShowWindow members in the STRARTUPINFO struct, but nothing seems to help.