Jump to content
  • Advertisement
Sign in to follow this  
Bezzant

Bitmaps/Win32

This topic is 5235 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!