###User Defined Function###
_WinAPI_GetAncestor

###Description###
Retrieves the handle to the ancestor of the specified window

###Syntax###
#include <WinAPI.au3>
_WinAPI_GetAncestor ( $hWnd [, $iFlags = 1] )


###Parameters###
@@ParamTable@@
$hWnd
	Handle to the window whose ancestor is to be retrieved.
	If this is the desktop window, the function returns 0.
$iFlags
	[optional] Specifies the ancestor to be retrieved. This parameter can be one of the following values:
		$GA_PARENT - Retrieves the parent window
		$GA_ROOT - Retrieves the root window by walking the chain of parent windows
		$GA_ROOTOWNER - Retrieves the owned root window by walking the chain of parent and owner windows returned by GetParent.
@@End@@

###ReturnValue###
Returns the handle of the ancestor window


###Remarks###
Above constants require #include <WindowsConstants.au3>


###Related###
_WinAPI_GetParent


###See Also###
@@MsdnLink@@ GetAncestor


###Example###
@@IncludeExample@@
