CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()-> m_pMainWnd;
// 获取活动的子框架
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame-> GetActiveFrame();
// 或者 CMDIChildWnd *pChild = pFrame-> MDIGetActive();
// 获取当前活动的视图指针
CMyView *pView = (CMyView *) pChild-> GetActiveView();
CmyDocument* pDoc =(CmyDocument*) pView-> GetDocumnet()