2016-02-27 54 views

回答

2

在SDI的情況下:

class CMainFrame : public CFrameWnd 
{ 
public: 
    CSplitterWnd m_wndSplitter; // add 
} 

BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
{ 
    if(!m_wndSplitter.CreateStatic(this, 1, 2)) 
     return FALSE; 

    m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CXXXView), CSize(10,10), pContext); 
    m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CYYYView), CSize(10,10), pContext); 
}