Jump to content
  • Advertisement
Sign in to follow this  


This topic is 5147 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
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.


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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!