CSplitterWnd::IdFromRowCol
更新 : 2007 年 11 月
指定された行、列におけるペインの子ウィンドウ ID を取得します。
int IdFromRowCol(
int row,
int col
) const;
パラメータ
row
分割ウィンドウの行を指定します。col
分割ウィンドウの列を指定します。
戻り値
ペインの子ウィンドウ ID を返します。
解説
このメンバ関数を使って、ビューでないペインを作成します。ペインが存在する前にも呼び出せます。
使用例
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;
}
必要条件
ヘッダー : afxext.h