CWnd::GetTopLevelParent
Visual Studio 2010
Call this member function to retrieve the window's top-level parent.
CWnd* GetTopLevelParent( ) const;
GetTopLevelParent is similar to GetTopLevelFrame and GetTopLevelOwner; however, it ignores the value set as the current owner window.