• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 776
  • Last Modified:

How to change all CListCtrl colors?

There are SetBkColor, SetTextBkColor and SetTextColor methods of CListCtrl. How to change text and back colors of selected items?
0
AVaulin
Asked:
AVaulin
1 Solution
 
laleonardCommented:
The CListCtrl uses the system colors for the selected text colors.  The only way to change them would be to globally change them (using ::SetSysColors()), or to make your CListCtrl an "owner-draw" control, by overriding CListCtrl::DrawItem() and drawing the whole Row yourself.Also, be aware that when the control loses focus, the background color of selected items changes to COLOR_3DFACE (if you have the "Always Show Selection" mode turned on).

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now