Share via


CSplitterWnd::IdFromRowCol

intIdFromRowCol(introw**,intcol);**

Return Value

The child window ID for the pane.

Parameters

row

Specifies the splitter window row.

col

Specifies the splitter window column.

Remarks

Call this member function to obtain the child window ID for the pane at the specified row and column. This member function is used for creating nonviews as panes and may be called before the pane exists.

Example

HBRUSH CMySplitter::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;
}

CSplitterWnd OverviewClass MembersHierarchy Chart

See Also   CSplitterWnd::GetPane, CSplitterWnd::IsChildPane