Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Window Handle from Process ID

Status
Not open for further replies.

Milby7

Programmer
Dec 5, 2003
67
GB
Does anyone know how to get an app's window handle after shelling it? i.e. you only know the applications process id but need it's window handle.
 
there is no API function what accomplishes that.

Ion Filipski
1c.bmp
 
i'm thinking about something like (but have not tried this):
- find out which threads are in the process by using psapi or a snapshot
- for each thread, call GetGUIThreadInfo
More about these functions to be found in MSDN Library.

Marcel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top