Share via


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.

Remarks

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.

Example

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();
   }
}

Requirements

Header: afxext.h

See Also

Reference

CSplitterWnd Class

Hierarchy Chart

CSplitterWnd::GetRowInfo

CSplitterWnd::RecalcLayout

Other Resources

CSplitterWnd Members