How do you get a processes window title from it's Process ID?
Posted on 2002-02-17 21:50:54 by Quantum
untested

;// after this function you can get the window handle from the structure it fills
GetGUIThreadInfo

;// call the fuction with the handle
GetWindowText
Posted on 2002-02-17 22:11:40 by smurf
one hint about GetGUIThreadInfo:
Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
Windows 95/98: Requires Windows 98 or later.


(unfortunately I dont know another solution)
Posted on 2002-02-18 04:14:44 by beaster
How do you get a processes window title from it's Process ID?


You'll have to know the window handle, as a process ID tells you nothing. The process could have multiple windows or no windows at all. There is probably a function to enumerate them though, or use FindWindow(Ex) to find it.

However GetWindowText does not work across processes. Send a WM_GETTEXT message directly instead.

Thomas
Posted on 2002-02-18 08:12:25 by Thomas