Solved

HBITMAP And BITMAPINFOHEADERS

Posted on 2001-07-02
7
369 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Tab names are off by one 5 54
sum28 challenge 31 117
wait notify demo infinite loop 3 151
ERP and the other system process verification 5 26
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

752 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