CMainFrame * pMainFrame=(CMainFrame *)AfxGetApp()->m_pMainWnd;
//假设你右边的类为: CRightView
CRightView * pRightView=pMainFrame->GetRightPane();

解决方案 »

  1.   

    CMainFrame * pMainFrame=(CMainFrame *)AfxGetApp()->m_pMainWnd;
    //假设你右边的类为: CRightView
    CRightView * pRightView=(CRightView *)pMainFrame->GetRightPane(); 
      

  2.   

    CSplitterWnd::GetPane 
    CWnd* GetPane( int row, int col );Return ValueReturns the pane at the specified row and column. The returned pane is usually a CView-derived class.ParametersrowSpecifies a row.colSpecifies a column.
      

  3.   

    CRightView * pRightView=(CRightView *)pMainFrame->GetRightPane(); 这个函数一定有的,是MFC自动生成的。
    CRightView* CMainFrame::GetRightPane()
    {
    //CSplitterWnd  m_wndSplitter
             CWnd* pWnd = m_wndSplitter.GetPane(0, 1);
    CRightView* pView = DYNAMIC_DOWNCAST(CRightView, pWnd); return pView;
    }这只是我写给你的一个例子,明白吗?