HBITMAP And BITMAPINFOHEADERS

Hi

What is the relationship between a BITMAPINFOHEADER and a HBITBMAP?

I have a LPBITMAPINFOHEADER but i want a HBITMAP so i can display it in a CStatic.


Cheers

Richard
RichJacksonAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
PacmanConnect With a Mentor Commented:
CreateDIBitmap() is your function:

HBITMAP CreateDIBitmap(
  HDC hdc,     // handle to device context
  CONST BITMAPINFOHEADER *lpbmih,  // ptr to bmp size and
                                   // format data
  DWORD fdwInit,            // initialization flag
  CONST VOID *lpbInit,      // ptr to initialization data
  CONST BITMAPINFO *lpbmi,  // ptr to bmp color-format data
  UINT fuUsage              // color-data usage
);

lpbInit points to your packed DIB-data.
You must create a BITMAPINFO structure which describes the bitmap.

Pacman
0
 
MichaelSCommented:
Don't think that you can do it in some easy way. Why you have only LPB...ER?
0
 
RichJacksonAuthor Commented:
I am using AVI api, to return a single frame. The frame data is returned as a packed DIB.

All i want to do is display it!

Thanks Again

Rich
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
MichaelSCommented:
than display dib directly, can you show your code or tell which function do you using?
0
 
PacmanCommented:
I'm not sure if this works with packed DIBs ...
But it's worth a try.
0
 
RichJacksonAuthor Commented:
CreateDIBitmap() is definetely my function! Cheers

The only thing is i am struggling with the fourth paramter ptr to initialisation data, i guess i need to manipulate my LPBitmapInfoheader.  But i dunno how!

Thanks Again Richard


 
0
 
PacmanCommented:
lpbInit is the bitmap data itself.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.