tags:

views:

49

answers:

2

Given an window handle, is it possible to tell if the window is modal, or maybe an mdi child window?

+2  A: 

The following will return true if and only if the window is a MDI child window:

GetWindowLong(Handle, GWL_EXTSTYLE) and WS_EX_MDICHILD <> 0

Andreas Rejbrand
A: 

It would also appear that if a window doesn't have the WS_CHILD style then it is a dialog,modal window, or mdi child.

GetWindowLong(Handle, STYLE) and WS_CHILD != WS_CHILD
Jeremy