1、可以使用全局函数AfxGetApp获得主框架指针 CMainFrame *pFrameWnd = (CMainFrame*)AfxGetApp()->GetMainWnd;2、再通过主框架指针活动当前活动视图指针 pFrameWnd->GetActiveView()