Solved

BITMAPINFO

Posted on 2001-08-22
4
877 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared 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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now