Frederiek
2006-02-23 16:37:06 UTC
Hello,
I would like to retrieve some system colors, such as COLOR_3DFACE,
COLOR_3DLIGHT and COLOR_3DSHADOW when the display mode is set to
highcolor (16bit colors). I know there's a function GetSysColor() to
retrieve the system color for these items, but it returns RGB colors
for true color mode (24bit color). So every color component (R, G and
B) is represented by 8 bit. However these values cannot immediately be
used when in 16bit mode. Is there a way to retrieve the exact RGB value
in 16bit mode, i.e. a 16bit value instead of a 24bit value?
I already wrote some code to convert 24bit to 16bit color, but the
result doesn't match exactly, there's a slight difference. E.g. if I
fill a window client area with the converted COLOR_3DFACE, it doesn't
exactly match the color of the surrounding window. Before I start
spending time on looking what the problem is, I thought I better look
for any existing function that does the work for me.
Regards,
Frederiek
I would like to retrieve some system colors, such as COLOR_3DFACE,
COLOR_3DLIGHT and COLOR_3DSHADOW when the display mode is set to
highcolor (16bit colors). I know there's a function GetSysColor() to
retrieve the system color for these items, but it returns RGB colors
for true color mode (24bit color). So every color component (R, G and
B) is represented by 8 bit. However these values cannot immediately be
used when in 16bit mode. Is there a way to retrieve the exact RGB value
in 16bit mode, i.e. a 16bit value instead of a 24bit value?
I already wrote some code to convert 24bit to 16bit color, but the
result doesn't match exactly, there's a slight difference. E.g. if I
fill a window client area with the converted COLOR_3DFACE, it doesn't
exactly match the color of the surrounding window. Before I start
spending time on looking what the problem is, I thought I better look
for any existing function that does the work for me.
Regards,
Frederiek