把CMyView对象的指针传给CMyDialog的对象不就ok了吗

解决方案 »

  1.   

    http://www.csdn.net/expert/topic/570/570255.xml?temp=.2136499
    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();
      

  2.   

    办法一。AfxGetMainWnd()然后获取当前视。
    办法二。对话框类的构造时传入父窗口指针。