[try Beta version]
Not logged in

 
Launching Another Program

Aug 10, 2008 at 7:46am
What is the most surefire way for a Win32 program to launch an EXE file and obtain a handle to its primary window? I read once that you can do this by launching the EXE, taking note of its process ID, enumerating all the windows and checking whether the current window's process ID matches the one you're searching for. Is there an easier way?
Aug 10, 2008 at 5:44pm
Nope.

[edit] You'll have to use EnumWindows() and GetWindowThreadProcessId().
Last edited on Aug 10, 2008 at 5:50pm
Topic archived. No new replies allowed.