在一个拆分窗口中(1行,2列,左边是TreeView,右边是CFormView),我如何能够让两个View互相得到对方的指针?

解决方案 »

  1.   

    就是得到对方的CWnd*型的指针
      

  2.   

    在XXXApp中定义CTreeView* m_pThreeView; CFormView* m_pFormView;
    在CThreeView.h中 extern CXXXApp theApp;
    在CThreeView的初始化函数中theApp.m_pThreeView=this;
    在CFormView.h中 extern CXXXApp theApp;
    在CFormView的初始化函数中theApp.m_pThreeView=this;
    这样两个View互相得到对方的指针了.
      

  3.   

    查一下分割条的成员函数,GetPane()
      

  4.   

    http://www.vckbase.com/document/viewdoc.asp?id=192