Solved

How to change all CListCtrl colors?

Posted on 1997-05-23
1
759 Views
Last Modified: 2013-11-19
There are SetBkColor, SetTextBkColor and SetTextColor methods of CListCtrl. How to change text and back colors of selected items?
0
Comment
Question by:AVaulin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
laleonard earned 20 total points
ID: 1301746
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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question