Solved

BITMAPINFO

Posted on 2001-08-22
4
889 Views
Last Modified: 2013-12-03
How do you get a BITMAPINFO from a CBitmap ?
0
Comment
Question by:win32
  • 3
4 Comments
 
LVL 6

Expert Comment

by:MichaelS
ID: 6413220
you can get HBITMAP from CBitmap and than you can use GetObject function.
0
 
LVL 6

Expert Comment

by:MichaelS
ID: 6413234
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
 

Accepted Solution

by:
trongnghia earned 20 total points
ID: 6416238
CBitmap supports: CBitmap::operator HBITMAP.
You can use this operator to get the attached Windows GDI handle of the CBitmap object

0
 
LVL 6

Expert Comment

by:MichaelS
ID: 6416452
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

790 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