본문 바로가기

Windows/MFC

Splitter 분할

BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/,
    CCreateContext* pContext)
{
    //return m_wndSplitter.Create(this,
    //    2, 2,             // TODO: adjust the number of rows, columns
    //    CSize(10, 10),     // TODO: adjust the minimum pane size
    //    pContext);

    if ( !m_wndSplitter.CreateStatic(this, 2, 1) )
    {
        return FALSE ;
    }

    m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(scrTop), CSize(0, 50), pContext);
    m_wndSplitter.CreateView(1, 0, RUNTIME_CLASS(CscrViewView), CSize(0, 0), pContext);
    m_wndSplitter.SetRowInfo(0, 30, 30);

    return true;
}