Export (0) Print
Expand All
Expand Minimize

CWnd::GetParent

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

Show:
© 2014 Microsoft