win32gui.GetTopWindow

int = GetTopWindow(hWnd)

Examines the Z order of the child windows associated with the specified parent window and retrieves a handle to the child window at the top of the Z order.

Parameters

hWnd : int

handle to parent window