Bitmaps/Win32

Started by
0 comments, last by Emmanuel Deloget 19 years, 8 months ago
Quick question- i can't seem to get my head around it. I'm basically wanting to make a tool that will display bitmaps from a custom file packing format (it wont include full bitmap info fileheader/info, just some basic info on dimensions and the raw bitmap data). My problem: how do I get a handle to the bitmap object just from my raw data? I could write a temp bitmap file (with file/info header) and use LoadImage and clean it up when im finished- however would prefer to access/do everything directly from the packed file. TIA
Advertisement
You'll have to read your file and to manually create your HBITMAP using :

HBITMAP CreateBitmap(  int nWidth,         // bitmap width, in pixels  int nHeight,        // bitmap height, in pixels  UINT cPlanes,       // number of color planes  UINT cBitsPerPel,   // number of bits to identify color  CONST VOID *lpvBits // color data array);


See the msdn for more infotmations about this function.

HTH

This topic is closed to new replies.

Advertisement