Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
DirectX: loading bmp's onto surfaces
I'm a newby teaching myself c++ and I'm just up to directX. So far I've just been reading online tutorials about how the directdraw objects work, and I've got the surfaces,fliping,screenmodes all working fine, but when I get to loading an image onto the buffer, I get some issues. firstly, can anyone tell me how to extract a PALETTEENTRY(s) from a bmp on disk? I cant find ANYTHING on this. secondly, I'm shaky on HBITMAP stuff, can anyone tell me if this is cos I dont have a palette or something else, when I do this:
hbm = ( HBITMAP )LoadImage( NULL,
NULL, Width, Height, LR_LOADFROMFILE | LR_CREATEDIBSECTION);
I get exactly eleven of these kick up at "back.bmp"
error C2018: unknown character '0xa0'
Everything i've read uses a DC to a HBITMAP to blt() onto a (DC to a) surface
If theres a better way to get bmp's onto surfaces i'd love to know, cos as you can see i'm a bit stumped.
0 · ·