但是虽然取得指针,但是没有办法引用到他的过程啊。

解决方案 »

  1.   

    能不能给我一段代码示意一下?
      

  2.   

    有些过程是private的,访问会违例,只有手工改成public的或将view设为friend.写个函数得到mainframe的指针:CMainFrame *CApp::GetMainFrame()
    {
      CMainFrame *pMF = (CMainFrame*)theApp.GetMainWnd();
      return pMF;
    }extern CApp theApp;CView::SomeFun()
    {
       CMainFrame *pMF = theApp.GetMainFrame();
       pMF->SomeFunInMainFrame();
    }
      

  3.   

    太感谢了!
    分已经给出。