How do you get a processes window title from it's Process ID?
untested
;// after this function you can get the window handle from the structure it fills
GetGUIThreadInfo
;// call the fuction with the handle
GetWindowText
;// after this function you can get the window handle from the structure it fills
GetGUIThreadInfo
;// call the fuction with the handle
GetWindowText
one hint about GetGUIThreadInfo:
(unfortunately I dont know another solution)
Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
Windows 95/98: Requires Windows 98 or later.
Windows 95/98: Requires Windows 98 or later.
(unfortunately I dont know another solution)
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