how to know the window type?

Hi forum members
I have a doubt, how i can get the window type from a window handle?, i mean to know if the owner of a window handle is a dialog box, button, edit text, listbox or static.
Thank you
[208 byte] By [xavierkdna] at [2007-12-16]
# 2
The window type can be found by using the Win32 function GetClassName(). Window types provided by the system will all have the same class name ("edit" for edit controls, "button" for various button types, etc).

Additional information can be found from the window styles, which can be obtained via the GetWindowLong() function specifying GWL_STYLE for the nIndex parameter. For example, pushbuttons and check boxes both have the window class "button" but pushbuttons will have the window style BS_PUSHBUTTON and check boxes will have the window style BS_CHECKBOX.

Hope this helps,

-Ron Pihlgren
VC++ Testing

RonPihlgren at 2007-9-9 > top of Msdn Tech,Visual C++,Visual C++ General...