IsModal method


Available for Window (non MDI child) and DialogBox objects.

Prototype

IsModal Proto hWnd:HWND

Syntax

Invoke IsModal, hWnd

Function

Determines whether the specified window object is modal or modeless.

Parameters

hWnd

Handle to the window object.

Return value

Eax/Rax returns the modal condition for the specified window object.


Possible returned values are:

TRUE    The specified window is modal.
FALSE  The specified window is modeless.
-1          hWnd is not a valid handle.


REMARKS
: You should call this method before destroying a Window or a DialogBox object in order to know whether it is a modal or a modeless window. Modal windows ALWAYS MUST be destroyed by calling the
EndModal method.