Call this member function to check if a frame window is modal or modeless.
BOOL InModalState( ) const;
Nonzero if yes; otherwise 0.
Header: afxwin.h