Solved

HBITMAP And BITMAPINFOHEADERS

Posted on 2001-07-02
7
355 Views
Last Modified: 2013-11-20
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
0
Comment
Question by:RichJackson
  • 3
  • 2
  • 2
7 Comments
 
LVL 6

Expert Comment

by:MichaelS
ID: 6245737
Don't think that you can do it in some easy way. Why you have only LPB...ER?
0
 

Author Comment

by:RichJackson
ID: 6246515
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
 
LVL 6

Expert Comment

by:MichaelS
ID: 6247492
than display dib directly, can you show your code or tell which function do you using?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 9

Accepted Solution

by:
Pacman earned 50 total points
ID: 6248434
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
 
LVL 9

Expert Comment

by:Pacman
ID: 6248440
I'm not sure if this works with packed DIBs ...
But it's worth a try.
0
 

Author Comment

by:RichJackson
ID: 6282023
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
 
LVL 9

Expert Comment

by:Pacman
ID: 6285505
lpbInit is the bitmap data itself.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Show shut-down message as Windows 8 shuts down. 9 85
iSeries DB2 Query 2 91
has77  challenge 9 73
Can not remove SSL certificate on iPhone 6 - iOS10.2 12 284
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now