In 256 color mode, sometimes necessary to use own palette. I have a custom
control here that uses a brighter shade of %COLOR_BTNFACE. For 256 color
mode, I create a palette and all works fine, until Netscape is started.
Netscape does bad things to palettes, so now all colors gets screwed up.
Slight problem with MSIE too, but not as bad and MSIE restores the palette
properly when minimized/closed. Seems like Netscape fails to do this.
Problem is, controls are not addressed on changes to palette, only top-level
windows are. So in a dialog, no problem, but how to handle this in a control,
especially a custom one that must be able to handle all things by itself?
Have tried passing on %WM_PALETTECHANGED and %WM_QUERYNEWPALETTE, but no
good solution for a custom control, plus it didn't work well..
Maybe not possible to use own palettes in controls? I can see another
potential danger - if control and dialog (or another control) has different
palettes, so I'm beginning to think I must skip idea of using own palette
in a custom control. In dialog, yes - in control, ?
Tried using a patterned brush instead, but text looks a bit bad on pattern,
even a "fine-masked" one. If anyone has any ideas on how to treat palettes
in controls, in 256 color mode, I'm all ears (or know if it's even possible).
------------------
control here that uses a brighter shade of %COLOR_BTNFACE. For 256 color
mode, I create a palette and all works fine, until Netscape is started.
Netscape does bad things to palettes, so now all colors gets screwed up.
Slight problem with MSIE too, but not as bad and MSIE restores the palette
properly when minimized/closed. Seems like Netscape fails to do this.
Problem is, controls are not addressed on changes to palette, only top-level
windows are. So in a dialog, no problem, but how to handle this in a control,
especially a custom one that must be able to handle all things by itself?
Have tried passing on %WM_PALETTECHANGED and %WM_QUERYNEWPALETTE, but no
good solution for a custom control, plus it didn't work well..
Maybe not possible to use own palettes in controls? I can see another
potential danger - if control and dialog (or another control) has different
palettes, so I'm beginning to think I must skip idea of using own palette
in a custom control. In dialog, yes - in control, ?
Tried using a patterned brush instead, but text looks a bit bad on pattern,
even a "fine-masked" one. If anyone has any ideas on how to treat palettes
in controls, in 256 color mode, I'm all ears (or know if it's even possible).
------------------
Comment