AllAPI Network - The KPD-Team

 
Allapi Network
 API-Guide
 ApiViewer

 API List

 
API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
 
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
 
This Site
 Search Engine
 Contact Form
 

Donate to AllAPI.net

GetAncestor

The GetAncestor function retrieves the handle to the ancestor of the specified window.

VB4-32,5,6
Declare Function GetAncestor Lib "user32.dll" (ByVal hwnd As Long, ByVal gaFlags As Long) As Long

VB.NET
System.Windows.Forms.Form.Owner

Operating Systems Supported
Requires Windows NT 4.0 SP4 or later; Requires Windows 98

Library
User32

Parameter Information
· 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. This parameter can be one of the following values.
GA_PARENT
Retrieves the parent window. This does not include the owner, as it does with the GetParent function.
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.

Return Values
The return value is the handle to the ancestor window.

Examples

Related Functions

No VB.NET Example Found

 

 


Copyright © 1998-2007, The Mentalis.org Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at http://allapi.mentalis.org/