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.
crankAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
galkinConnect With a Mentor Commented:
You must use owner draw list control and implement custom paint for various states.
0
 
RONSLOWCommented:
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
All Courses

From novice to tech pro — start learning today.