if i knew the exe name and it was running, how would i get the Hwnd from it ?
thanks.
Printable View
if i knew the exe name and it was running, how would i get the Hwnd from it ?
thanks.
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
You use the FindWindow and GetWindow API's ;)
FindWindow
GetWindow
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.