开发者

Light blue color from WinUser.h

开发者 https://www.devze.com 2023-04-10 21:00 出处:网络
I need to implem开发者_如何学编程ent a MouseOver effect on some listbox items and I need to use a light blue as the highlight color.

I need to implem开发者_如何学编程ent a MouseOver effect on some listbox items and I need to use a light blue as the highlight color.

Does anyone know from the winuser.h file what constant is the light blue color ? I tested over 20 of them, cannot find the correct one, maybe someone here knows.

Thanks.


If you don't need a specific "light blue", open Paint, or any other program that handles colors, and move the color sliders until you get the RGB values you need. Then do:

COLORREF myLightBlue = RGB(R, G, B);

I think you'll find you need a high B value, to make it blue, and quite high R and B values, to make it light. For example, you can try RGB(200, 230, 255);

Anyway, it would probably be advisable to use some system color, taken with ::GetSysColor()

EDIT:
If you are using visual styles, I think you have to use GetThemeColor() to get the color defined by the current theme. Ive never used it myself, so I cannot help with that.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号