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


CSplitterWnd::IdFromRowCol

Obtains the child window ID for the pane at the specified row and column.

int IdFromRowCol(
   int row,
   int col 
) const;

Параметры

  • row
    Specifies the splitter window row.

  • col
    Specifies the splitter window column.

Возвращаемое значение

The child window ID for the pane.

Заметки

This member function is used for creating nonviews as panes and may be called before the pane exists.

Пример

HBRUSH CMySplitterWnd::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
   HBRUSH hbr = CSplitterWnd::OnCtlColor(pDC, pWnd, nCtlColor);

   if(nCtlColor == CTLCOLOR_LISTBOX && 
      pWnd->GetDlgCtrlID() == IdFromRowCol(1,0))
   {
      // Pane 1,0 is a list box. Set the color of the text to be blue.
      pDC->SetBkColor(m_BkColor);
      pDC->SetTextColor(RGB(0,0,255));
      return (HBRUSH)m_hbrListBoxBkgnd.GetSafeHandle();
   }
   // TODO: Return a different brush if the default is not desired
   return hbr;
}

Требования

Header: afxext.h

См. также

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

CSplitterWnd Class

CSplitterWnd Members

Hierarchy Chart

CSplitterWnd::GetPane

CSplitterWnd::IsChildPane