I have my own C ++ application for Windows that starts two child processes using the following code -
if (!CreateProcess(NULL, // No module name (use command line) cmdLine, // szCmdline, // Command line NULL, // Process handle not inheritable NULL, // Thread handle not inheritable false, // Set handle inheritance to FALSE CREATE_DEFAULT_ERROR_MODE | NORMAL_PRIORITY_CLASS // Process Create Flags NULL, // Use parent environment block NULL, // workingDir, // Use parent starting directory &si, // Pointer to STARTUPINFO structure &pi) // Pointer to PROCESS_INFORMATION structure
with all parameters in the STARTUPINFO 0. block. This code works great when starting processes. However, I need to be able to run console windows C ++ applications with minimized windows.
If I add CREATE_NO_WINDOW to the process creation flags, I can start the processes without any windows. That would be unacceptable.
In my research, there seems to be no way to get the console application to open in minimized mode. Is it correct?
Yes, I know that I could minimize windows of child applications from my own process, but other programmers on the team prefer not to.
source share