Поделиться через


CSplitterWnd::SetColumnInfo

Call to set the specified column information.

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

Параметры

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

Требования

Header: afxext.h

См. также

Основные понятия

CSplitterWnd Class

CSplitterWnd Members

Hierarchy Chart

CSplitterWnd::GetRowInfo

CSplitterWnd::RecalcLayout