Trouble with original size of splitter pane

I use a nest split as follow:
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/,
      CCreateContext* pContext)
      // create splitter window

      if(!m_wndSplitter1.CreateStatic(this, 2,1) ||
         !m_wndSplitter1.CreateView(1, 0, RUNTIME_CLASS(CView1), CSize(0,50),pContext)        ||      
         !m_wndSplitter2.CreateStatic(&m_wndSplitter1, 1, 2, WS_CHILD | WS_VISIBLE | WS_BORDER, m_wndSplitter1.IdFromRowCol(0,0)) ||
         !m_wndSplitter2.CreateView(0, 0, RUNTIME_CLASS(CrView2), CSize(200,100), pContext) ||
         !m_wndSplitter2.CreateView(0, 1, RUNTIME_CLASS(CView3), CSize(100,100),pContext))
                  return FALSE;

      return TRUE;

But CView1 always fill the full client area, anyone can solve this problem?
Who is Participating?
mikeblasConnect With a Mentor Commented:
You need to call m_wndSplitter1.RecalcLayout().

..B ekiM
NetGhostAuthor Commented:
Thank you ,mikeblas.
   Call m_wndSplitter1.RecacLayout() seems doesn't work.
I'v solved this problem by call SetRowInfo() and SetColumnInfo()
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.