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
Expand Minimize


Call this function to get a pointer to a child window's parent window (if any).

CWnd* GetParent( ) const;

See the Return Values section in GetParent in the Windows SDK.

The GetParent function returns a pointer to the immediate parent (if it exists). In contrast, the GetParentOwner function returns a pointer to the most immediate parent or owner window that is not a child window (does not have the WS_CHILD style). If you have a child window within a child window GetParent and GetParentOwner return different results.

Header: afxwin.h

© 2015 Microsoft