I am creating a process to launch mspaint application using the following code
::CreateProcess(0, strCmdLine.GetBuffer(0), 0, 0, FALSE, 0, 0, 0, &si, &pi)
Once the application is launched, i need to minimise the paint application. How can i do it?
I am creating a process to launch mspaint application using the following code
::CreateProcess(0, strCmdLine.GetBuffer(0), 0, 0, FALSE, 0, 0, 0, &si, &pi)
Once the application is launched, i need to minimise the paint application. How can i do it?
Find the window and minimize it with ShowWindow function
You can also try to send a WM_SYSCOMMAND with SC_MINIMIZE to the application's main window. But ShowWindow(SW_MINIMIZE) for the application's main window, should do the job.
So minimize the application i need to get the hwnd for that. How can i get it?
Since you created a window in your application (and you didn't say you hadn't done it) that you got somewhere in your code this window handle returned by one of the Win API such as CreateWindow(Ex) or CreateDialog or something similar
Last edited by VictorN; December 3rd, 2008 at 06:34 AM.
The parent window is creating a process and I am not able to bring the newly created window to top. For this reason i have tried to minimise the parent window so that the focus will be on the newly created application.
In short I need to have the newly created application in the top. How can i do that
Bookmarks