Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CSplitterWnd::SetColumnInfo

CSplitterWnd::SetColumnInfo 

Call to set the specified column information.


void SetColumnInfo(
   int col,
   int cxIdeal,
   int cxMin 
);

Parameters

col

Specifies a splitter window column.

cxIdeal

Specifies an ideal width for the splitter window column in pixels.

cxMin

Specifies a minimum width for the splitter window column in pixels.

Call this member function to set a new minimum width and ideal width for a column. The column minimum value determines when the column will be too small to be fully displayed.

When the framework displays the splitter window, it lays out the panes in columns and rows according to their ideal dimensions, working from the upper-left to the lower-right corner of the splitter window's client area.

void CChildFrame::OnSize(UINT nType, int cx, int cy) 
{
   CMDIChildWnd::OnSize(nType, cx, cy);

   CRect rect;
   GetWindowRect( &rect );
   if( m_bSplitterCreated )  // m_bSplitterCreated set in OnCreateClient
   {
      m_wndSplitter.SetColumnInfo(0, rect.Width()/2, 10);
      m_wndSplitter.SetColumnInfo(1, rect.Width()/2, 10);
      m_wndSplitter.RecalcLayout();
   }
}

Community Additions

ADD
Show:
© 2015 Microsoft