CMainFrame * pMainFrame=(CMainFrame *)AfxGetApp()->m_pMainWnd;
//假设你右边的类为: CRightView
CRightView * pRightView=pMainFrame->GetRightPane();
//假设你右边的类为: CRightView
CRightView * pRightView=pMainFrame->GetRightPane();
//假设你右边的类为: CRightView
CRightView * pRightView=(CRightView *)pMainFrame->GetRightPane();
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.
CRightView* CMainFrame::GetRightPane()
{
//CSplitterWnd m_wndSplitter
CWnd* pWnd = m_wndSplitter.GetPane(0, 1);
CRightView* pView = DYNAMIC_DOWNCAST(CRightView, pWnd); return pView;
}这只是我写给你的一个例子,明白吗?