|
-
Mar 26th, 2005, 01:47 PM
#1
Thread Starter
Hyperactive Member
getting Hwnd from an exe name
if i knew the exe name and it was running, how would i get the Hwnd from it ?
thanks.
-
Mar 26th, 2005, 02:42 PM
#2
Junior Member
Re: getting Hwnd from an exe name
I need this too. You should check my post periodically too, you might get an answer. If I get an answer I'll post it here for you
-
Mar 26th, 2005, 03:00 PM
#3
Re: getting Hwnd from an exe name
You use the FindWindow and GetWindow API's 
FindWindow
GetWindow
-
Mar 26th, 2005, 04:39 PM
#4
Re: getting Hwnd from an exe name
I think what you have to do is enumerate all top level windows using
EnumWindows
This will give you a handle to each window.
Now, for each handle you get, call
GetWindowModuleFilename
which should return the file name associated with the hWnd.
take the one that matches your exe name.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|