CMFCListCtrl::OnGetCellBkColor
The framework calls this method when it must determine the background color of an individual cell.
virtual COLORREF OnGetCellBkColor(
int nRow,
int nColumn
);
Parameters
[in] nRow
The row of the cell in question.[in] nColumn
The column of the cell in question.
Return Value
A COLOREF value that specifies the background color of the cell.
Remarks
The default implementation of OnGetCellBkColor does not use the supplied input parameters and instead simply calls GetBkColor. Therefore, by default, the whole list control will have the same background color. You can override OnGetCellBkColor in a derived class to mark individual cells with a separate background color.
Requirements
Header: afxlistctrl.h