Link to home
Start Free TrialLog in
Avatar of srantala
srantala

asked on

256-color CBitmapButton

How I can use more than 20-color bitmapbutton in 8bit-mode? In better than 8bit everything works fine. MFC seems to reduce colours when I start application.
Avatar of AVaulin
AVaulin
Flag of Ukraine image

MFC don't reduce colours. It may be Windows does. To remove any problems convert your image to standard 256 palette.
Avatar of srantala
srantala

ASKER

All the pictures have been made with the standard 256-palette. BitmapButton just doesn't show all of them.

All the pictures have been make with the standard 256-colour-palette. BitmapButton just doesn't show all of them.

Do you use bitmaps with compression? If yes try to save bitamps without compression.
ASKER CERTIFIED SOLUTION
Avatar of chensu
chensu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To chensu:
  Why do you think that there is no standard 256 colors palette? You can choose 16 colors palette from 64 available colors and you can choose 256 colors palette from (don't remember how much) available colors too.
To AVaulin:
Windows reserves standard 20 colors for system use (window titles, menus, ...) in a palette. The other colors are arbitrary. If an application has its own 256 colors palette, it must process WM_QUERYNEWPALETTE and WM_PALETTECHANGED messages.