What color to use in owner-draw Windows List Control background?
Posted
by Mark Ransom
on Stack Overflow
See other posts from Stack Overflow
or by Mark Ransom
Published on 2010-04-12T23:05:41Z
Indexed on
2010/04/12
23:33 UTC
Read the original article
Hit count: 309
I have an owner-drawn list control in my Windows program. I use CListCtrl::GetBkColor to get the background color, and for a selected item I use GetSysColor(COLOR_HIGHLIGHT). This matches what Windows uses for non owner drawn list controls, except for the case where the control doesn't have focus - then the background is replaced with gray.
Does Windows use one of the GetSysColor constants for the selected but unfocused background? If so, which one?
© Stack Overflow or respective owner