256 color bitmap, CDialog - palette problem 
Author Message
 256 color bitmap, CDialog - palette problem

I am having trouble displaying a 256 color bitmap in a CDialog window on
PCs with 256 displayed colors.
The bitmap colors are displayed OK in an 'ordinary' C application, but
not in my MFC application. Both apps use the same bitmap file, but my
MFC app contains the bitmap in the resource section and the other app
loads it at runtime.

Here's a reproduction path using Developer Studio - the problem shows up
before you even compile and run (I think Developer Studio uses MFC)...

From the desktop Control Panel, set the number of colors to 256. (This
will simulate graphics cards that have this as the maximum number of
colors).
Create or open an MFC project in Developer Studio.
Add the bitmap to the Resource section.
(on my PC, Developer Studio displays the bitmap correctly)
Create a dialog box.
Add a "Picture" control.
Set the properties of the picture to Type="Bitmap", Image=<ID of
bitmap>.
The bitmap will be displayed. But not all of the colors are correct.

I suspect that there is some kind of "color mapping problem".
There may be some restrictions on the maximum number of colors that can
actually be used in a bitmap. If so, I would like to know what they are
so that I can communicate that to our graphic designer.

TIA for any help,
   Gerry Taylor




Sun, 02 Dec 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. 256 color Bitmap/palette question

2. Palette info for BITMAP resources -- 256-color video

3. 256 color Bitmap/palette question

4. displaying 256 color bitmap in 256 color mode

5. Problem in display 256 color bitmap

6. Need help to select a 256 color bitmap into 16 bit color DC

7. 256 color display mode & bitmap problems

8. Changing default palette on 256 color VGA driver

9. 256 color palette question

10. CButton, Palette and 256 color display

11. TC++ 256 color palette

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

 

 
Powered by phpBB® Forum Software