Solved

HBITMAP And BITMAPINFOHEADERS

Posted on 2001-07-02
7
376 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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
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

Technology Partners: 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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

617 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