Sign in to follow this  
Bezzant

Bitmaps/Win32

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.

HTH

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this