Group: Window - Library: user32
HWND GetAncestor(
HWND hwnd, // handle to window
UINT gaFlags // ancestor
);
DECLARE INTEGER GetAncestor IN user32;
INTEGER hwnd,;
INTEGER gaFlags
hwnd [in] Handle to the window whose ancestor is to be retrieved. If this parameter is the desktop window, the function returns NULL.
gaFlags [in] Specifies the ancestor to be retrieved.
The return value is the handle to the ancestor window.