CListCtrl::SetTextBkColor
TOC
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

CListCtrl::SetTextBkColor

Sets the background color of text in a list view control.

BOOL SetTextBkColor(
   COLORREF cr 
);

Parameters

cr
A COLORREF specifying the new text background color. For information, see COLORREF in the Platform SDK.

Return Value

Nonzero if successful; otherwise zero.

Example

// The pointer to my list view control.
extern CListCtrl* pmyListCtrl;

// Use the 3D button face color for the text background.
COLORREF crBkColor = ::GetSysColor(COLOR_3DFACE);
pmyListCtrl->SetTextBkColor(crBkColor);
ASSERT(pmyListCtrl->GetTextBkColor() == crBkColor);

See Also

CListCtrl Overview | Class Members | Hierarchy Chart | CListCtrl::GetTextBkColor

Show:
© 2016 Microsoft