views:

58

answers:

1

Hello guys, I'm developing an application the screen grab a thrid party app. Right now I've no problem in finding all the belonging forms, menus and popups in the 3rd party app I plan to grab, but i don't know how can I findout if the window I'm grabbing is a popup or a menu or whatever. Is there any function that given the window handle tells me what of window it is ?

Tks, Jose

+1  A: 

You can get much of this information from the Windows class.

Once you have the window handle (HWND), you can use GetClassName() to get the window class name, then GetClassInfo() to get info about the window class itself.

The window class info has the style, which contains much of this info about the class (ie: menus should be style #32768). For details about Window Classes, see MSDN.

Reed Copsey