How to get main window handle from process handle?
I want to set widow positon before it show on screen.
thanks.
A window that edits its own position or editing of another window's position?
to 2-Bit Chip:
I have the process handle of an external process
created from within my application.How do I get the window handle from the process
handle?
thanks
How did you run the process? ShellExecute or CreateProcess?
Have a look at EnumThreadWindows
How did you run the process? ShellExecute or CreateProcess?
CreateProcess, and i tried to change STARTUPINFO dwx, dwy, dwflags, not working.
other question here, after i invoke CreateProcess, the main window is already created or not?
i want to change window's position before it shows.
The STARTUPINFO dwFlags member needs to include STARTF_USEPOSITION, and the x and y parameters for CreateWindowEx need to specify CW_USEDEFAULT.