The WindowEx.GetTopWindow function examines the Z order of the child windows associated with the specified parent window and retrieves the handle of the child window at the top of the Z order.
number WindowEx.GetTopWindow(
number hWnd --handle of parent window
);
Parameters
hWnd
Identifies the parent window whose child windows are to be examined. If this parameter is 0, the function returns a handle of the window at the top of the Z order.
Return Values
If the function succeeds, the return value is the handle of the child window at the top of the Z order. If the specified window has no child windows, the return value is 0.