Solved

ListCtrl item highlight color when control not focused

Posted on 1997-10-24
2
325 Views
Last Modified: 2013-11-20
How can I set the color that is used for the highlighted (selected) item in a list control when the list control does not have the focus?
I am using the LVS_SHOWSELALWAYS style so that the selection is shown even when the control does not have the focus.  However, the highlight is changed to grey when focus leaves the control and if the system color for windows is set to grey, then the highlight cannot be seen. I know this can be done with owner-drawn controls, but I'm hoping to avoid that.
0
Comment
Question by:crank
2 Comments
 
LVL 7

Accepted Solution

by:
galkin earned 10 total points
Comment Utility
You must use owner draw list control and implement custom paint for various states.
0
 
LVL 10

Expert Comment

by:RONSLOW
Comment Utility
I am not sure what system color the list view control uses to draw it's higlights.  It is probably doing the correct thing, but whoever is changing the windows color scheme may not be being careful enough to ensure that colours are still distinct.

I'll see what I can find about the colour the control uses - you may just have to change another colour in the windows colour scheme to get a contrast.

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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 demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now