Get Window HANDLEs of a Process
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
Having the process ID or HANDLE of a particular process, is there a way to find out its main window(or enum through all windows those were created by that process)? Thank you.
Ok i am new to answering question but i think your asking if you have a handle can you find out whether it is a child and then get the main window. If I am right then use: BOOL IsChild(HWND hwndParent, HWND hWnd); MSDN Library Lookup for IsChild Ok so now you have checked your handle and its a child. Now you use: HWND GetParent( HWND hWnd ); MSDN Lib: GetParent I hope this helps Discovery consist of seeing what everybody has seen and thinking what nobody has thought -- Albert Szent-Györgyi Name the greatest of all the inventors: accident --Mark Twain