GetActiveView()然后直接访问!

解决方案 »

  1.   

    afxgetapp()->getmainwnd()->get......忘了,我的msdn出问题了。sorry.反正你查一下msdn就有了.ok
      

  2.   

    CMDIFrameWnd *pFrame = 
                 (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;// Get the active MDI child window.
    CMDIChildWnd *pChild = 
                 (CMDIChildWnd *) pFrame->GetActiveFrame();// or CMDIChildWnd *pChild = pFrame->MDIGetActive();// Get the active view attached to the active MDI child
    // window.
    CMyView *pView = (CMyView *) pChild->GetActiveView();
      

  3.   

    (CYourFrmView)AfxGetApp()->你的变量