Solved

ListCtrl item highlight color when control not focused

Posted on 1997-10-24
2
332 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
ID: 1308738
You must use owner draw list control and implement custom paint for various states.
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1308739
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
iSeries FTP Exit Program 8 135
dog bark java program 15 94
matchUp  challenge 9 105
Thin secure Windows 10 5 93
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
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 tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

813 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