I would like to use CreateProcess to start an app minimised but I just can't get it to work.
As a test, I set up the CreateProcess parameters and STARTUPINFO structure with the following lines;
CString m_Process = "C:\\WINDOWS\\NOTEPAD.EXE";
char *vip = "C:\\WINDOWS\\NOTEPAD.EXE";
memset(&suInfo, 0, sizeof(suInfo));
suInfo.cb = sizeof(suInfo);
suInfo.dwFlags = STARTF_USESHOWWINDOW;
suInfo.wShowWindow = SW_MINIMIZE;
And then on the press of a key, I called the CreateProcess thus;
I thought this code would start notepad minimised but it starts as a normal window... any ideas on what is wrong?