• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 928
  • Last Modified:

BITMAPINFO

How do you get a BITMAPINFO from a CBitmap ?
0
win32
Asked:
win32
  • 3
1 Solution
 
MichaelSCommented:
you can get HBITMAP from CBitmap and than you can use GetObject function.
0
 
MichaelSCommented:
Something like
DIBSECTION bitmap;

GetObject(HBITMAP(myBitmap), sizeof(DIBSECTION), &bitmap);

bitmap.dsBmih is almost what you are looking for. For sure you will have to do some additional things if you are interested in paletter.
0
 
trongnghiaCommented:
CBitmap supports: CBitmap::operator HBITMAP.
You can use this operator to get the attached Windows GDI handle of the CBitmap object

0
 
MichaelSCommented:
trongnghia, read the question before you propose a comment, and for sure you have to do it if you propose an answer. First of all your answer is wrong and second, in my comment I already show how to use operator HBITMAP(). BTW, looks like you have to ready users guidlines for that site.
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.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now