UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | req.apiset | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:winuser.GetAncestor |
GetAncestor function (winuser.h) |
Retrieves the handle to the ancestor of the specified window. |
|
winmsg\getancestor.htm |
winmsg |
VS|winui|~\winui\windowsuserinterface\windowing\windows\windowreference\windowfunctions\getancestor.htm |
12/05/2018 |
GA_PARENT, GA_ROOT, GA_ROOTOWNER, GetAncestor, GetAncestor function [Windows and Messages], _win32_GetAncestor, _win32_getancestor_cpp, winmsg.getancestor, winui._win32_getancestor, winuser/GetAncestor |
winuser.h |
Windows.h |
Windows |
Windows 2000 Professional [desktop apps only] |
Windows 2000 Server [desktop apps only] |
User32.lib |
User32.dll |
Windows |
19H1 |
|
|
|
|
|
|
ext-ms-win-ntuser-window-l1-1-1 (introduced in Windows 8.1) |
Retrieves the handle to the ancestor of the specified window.
Type: HWND
A handle to the window whose ancestor is to be retrieved. If this parameter is the desktop window, the function returns NULL.
Type: UINT
The ancestor to be retrieved. This parameter can be one of the following values.
Value | Meaning |
---|---|
|
Retrieves the parent window. This does not include the owner, as it does with the GetParent function. |
|
Retrieves the root window by walking the chain of parent windows. |
|
Retrieves the owned root window by walking the chain of parent and owner windows returned by GetParent. |
Type: HWND
The return value is the handle to the ancestor window.
Conceptual
Reference