PDA

View Full Version : Minimize other Window



johncharlesb
14th October 2007, 13:54
I'm using Qt-4.3.0. In my program, I have used QProcess to start an exe. Now, i would like to minize that window. how can I do that? My code is very simple.

QProcess process;
process.execute("notepad.exe");

Now, I want to minimize the notepad application. Because when I run my program, the notepad becaomes the active window. I want my application to be active at the same time, i would like to minimze the notepad's window.

marcel
14th October 2007, 16:22
The only way is to send a minimize message to the notepad instance with SendMessage (http://msdn2.microsoft.com/en-us/library/ms644950.aspx).
But what if you have more than one notepad instance? The problem is how do you identify the instance you started.