News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

How to get main window handle from process handle?

Started by stbfish, November 23, 2009, 01:37:28 AM

Previous topic - Next topic

stbfish

How to get main window handle from process handle?
I want to set widow positon before it show on screen.
thanks.

2-Bit Chip

A window that edits its own position or editing of another window's position?

stbfish

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

2-Bit Chip

How did you run the process? ShellExecute or CreateProcess?

sinsi

Light travels faster than sound, that's why some people seem bright until you hear them.

stbfish

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.

MichaelW

The STARTUPINFO dwFlags member needs to include STARTF_USEPOSITION, and the x and y parameters for CreateWindowEx need to specify CW_USEDEFAULT.
eschew obfuscation