Link to home
Start Free TrialLog in
Avatar of crank
crank

asked on

ListCtrl item highlight color when control not focused

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.
ASKER CERTIFIED SOLUTION
Avatar of galkin
galkin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RONSLOW
RONSLOW

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.