试试
CWnd* CWnd::GetParent( ) const;
或者
CWnd* CWnd::GetOwner( ) const;