MDI中,如何获得cview类指针?
CView* cview=AfxGetMainWnd()->MDIGetActive()->GetActiveView();
但是提示说MDIGetActive' : is not a member of 'CWnd';
怎么改呢?
thanks!
CView* cview=AfxGetMainWnd()->MDIGetActive()->GetActiveView();
但是提示说MDIGetActive' : is not a member of 'CWnd';
怎么改呢?
thanks!
对话框类对象建立后把View类的指针传给它
CMainFrame* pMainWnd = (CMainFrame*) AfxGetMainWnd();
CMDIChildWnd* ptmpChildWnd = pMainWnd->MDIGetActive();
CMyClassView* pCurrentView = (CMyClassView*) ptmpChildWnd->GetActiveView();