Export (0) Print
Expand All
MFC
Expand Minimize
1 out of 1 rated this helpful - Rate this topic

CListCtrl::SetBkColor 

Sets the background color of the list view control.


BOOL SetBkColor(
   COLORREF cr 
);

Parameters

cr

Background color to set, or the CLR_NONE value for no background color. List view controls with background colors redraw themselves significantly faster than those without background colors. For information, see COLORREF in the Platform SDK.

Nonzero if successful; otherwise zero.

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

// Use the 3D button face color for the background.
COLORREF crBkColor = ::GetSysColor(COLOR_3DFACE);
pmyListCtrl->SetBkColor(crBkColor);
ASSERT(pmyListCtrl->GetBkColor() == crBkColor);
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.