Solved

BITMAPINFO

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How Does Quick Books store date / time? 3 93
Mixed results 10 79
Need an intro to -- .Net SQL Authorization Manager 7 75
What .NET URL re-routing tool did I use? 2 31
This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

947 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

22 Experts available now in Live!

Get 1:1 Help Now