Click to See Complete Forum and Search --> : Minimizing Process


Odiee
October 1st, 2008, 04:29 AM
Hi.

I'm using CreateProcess to execute program and obtain it's process ID and handle. Now I want to tell that process to hide it self from screeen, or minimize it self, but it seems win32 doesn't have a functions to do that.
How can I send messages to different process?

Marc G
October 1st, 2008, 08:35 AM
Try to use the STARTUPINFO parameter of CreateProcess and fill in dwFlags=STARTF_USESHOWWINDOW and wShowWindow=SW_HIDE

olivthill
October 1st, 2008, 09:21 AM
Use:PostMessage(hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0L);
PostMessage(hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0L);

bitshifter420
October 10th, 2008, 12:51 AM
CloseWindow(hwnd);