[comp.windows.ms.programmer] How to BitBlt a 256 color bitmap?

kevino@hpcc01.HP.COM (Kevin Owen) (05/23/91)

How can I manipulate (Blt) a 256 color bitmap that was loaded as a resource?

I have successfully loaded and Blt'ed several 16 color bitmaps using
the following piece of code.  When I attempt to do the same with a
256 color bitmap it gets rendered in 16 colors.  I can read the 256
color image into PaintBrush and it looks fine.  

    MemoryDC = CreateCompatibleDC(hDC);
    SelectObject(MemoryDC, h_bitmap);
    GetObject(h_bitmap, sizeof(BITMAP), (LPSTR) &bm);
    width = bm.bmWidth;
    height = bm.bmHeight;
    BitBlt(hDC, xpos, ypos, width, height, MemoryDC, 0, 0, SRCCOPY);
    DeleteDC(MemoryDC);

I am using a 34020 based video adapter (HP IGC-20) running in 
1024x768x256 colors.

Perhaps I need to do something to load the correct palette?
Or should Windows be doing that for me?

Any ideas (or snippits of code) would be greatly appreciated.

_______________________________________________________________________________

 _   ,                   __                 Kevin Owen @ Hewlett-Packard
' ) /                   / ')                Sunnyvale, California
 /-<   _ , __o  ____   /  / , , , _  ____   Phone :    (408) 720-3845
/   ) </_\/ <__/ / <  (__/ (_(_/_</_/ / <_  UN*X Mail  ...hplabs!hpcc01!kevino
_______________________________________________________________________________