CWnd* GetParent( ) const;
Return Value
Identifies the parent window if the member function is successful. Otherwise, the value is NULL, which indicates an error or no parent window.
The returned pointer may be temporary and should not be stored for later use.
Remarks
Call this function to get a pointer to a child window’s parent window (if any). The GetParent function returns a pointer the immediate parent. 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.
CWnd Overview | Class Members | Hierarchy Chart
See Also CWnd::GetParentOwner, CWnd::GetOwner, CWnd::SetOwner, CWnd::SetParent, ::GetParent