This documentation is archived and is not being maintained.


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 Platform 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.