Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
MFC
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CWnd::GetAncestor

Retrieves the ancestor window object of the specified window.

CWnd* GetAncestor( 
   UINT gaFlags 
) const;

gaFlags

Specifies the ancestor to be retrieved. For a complete list of possible values, see GetAncestor.

If the function succeeds, the return value is a pointer to the ancestor window object. If the function fails, the return value is NULL.

This member function emulates the functionality of the function GetAncestor, as described in the Windows SDK.

Header: afxwin.h

Community Additions

ADD
Show:
© 2015 Microsoft