CButton, Palette and 256 color display 
Author Message
 CButton, Palette and 256 color display

I have a custom drawn button derived from CButton. The face just shows
a color. I have created a palette containing that color in the derived
class. I run this on a 256 color display, the color is not in the
system palette. When the DrawItem is called for the button, I
SelectPalette on my palette, then call RealizePalette but alas the
color is not displayed properly.
Any idea what I may be doing wrong !!


Sat, 23 Apr 2005 09:08:13 GMT  
 CButton, Palette and 256 color display
You might want to read KB article Q137372.  Palette management is,
unfortunately, more involved than one might guess.  Frankly I'm not sure how
well you'll fare adjusting the palette for a single control.

http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q137372&

TFM3

Note: Spam-resistant e-mail address


Quote:
> I have a custom drawn button derived from CButton. The face just shows
> a color. I have created a palette containing that color in the derived
> class. I run this on a 256 color display, the color is not in the
> system palette. When the DrawItem is called for the button, I
> SelectPalette on my palette, then call RealizePalette but alas the
> color is not displayed properly.
> Any idea what I may be doing wrong !!



Sat, 23 Apr 2005 14:21:35 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. displaying 256 color bitmaps when screen is in 256 color mode

2. showing 256 color bitmaps with display settings set to 256 colors

3. displaying 256 color bitmap in 256 color mode

4. displaying RGB DIB on 256 colour display - palette?

5. 256 color bitmaps get remapped with 16 color palette when using 256 color display?

6. Help: 256 color icons displayed in 16 colors

7. Why 256 color image is displayed as 16 color image

8. Changing default palette on 256 color VGA driver

9. 256 color Bitmap/palette question

10. 256 color palette question

11. TC++ 256 color palette

12. CImageList and 256 color images with non-standard palettes

 

 
Powered by phpBB® Forum Software