@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The GetAncestor API !!!!C# Signature: /// <summary> /// Retrieves the handle to the ancestor of the specified window. /// </summary> /// <param name="hwnd">A handle to the window whose ancestor is to be retrieved. /// If this parameter is the desktop window, the function returns NULL. </param> /// <param name="flags">The ancestor to be retrieved.</param> /// <returns>The return value is the handle to the ancestor window.</returns> [DllImport("user32.dll", ExactSpelling = true)] static extern IntPtr GetAncestor(IntPtr hwnd, GetAncestorFlags flags); !!!!VB.NET Signature: <DllImport("user32.dll", ExactSpelling:=True)> _ Private Shared Function GetAncestor(ByVal hwnd As IntPtr, ByVal gaFlags As GetAncestor_Flags) As IntPtr End Function !!!!User-Defined Types: [GetAncestor_Flags] !!!!Notes: Use the following values for the flags: private const uint GA_PARENT = 1; // Retrieves the parent window.This does not include the owner, as it does with the GetParent function. private const uint GA_ROOT = 2; // Retrieves the root window by walking the chain of parent windows. private const uint GA_ROOTOWNER = 3; // Retrieves the owned root window by walking the chain of parent and owner windows returned by GetParent. !!!!Tips & Tricks: Please add some! !!!!Sample Code: Please add some! !!!!Alternative Managed API: Do you know one? Please contribute it! Documentation: GetAncestor@msdn on MSDN
Edit user32.getancestor
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.