?
Solved

BITMAPINFO

Posted on 2001-08-22
4
Medium Priority
?
919 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 80 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

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

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
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…
Screencast - Getting to Know the Pipeline

807 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