Link to home
Start Free TrialLog in
Avatar of win32
win32

asked on

BITMAPINFO

How do you get a BITMAPINFO from a CBitmap ?
Avatar of MichaelS
MichaelS

you can get HBITMAP from CBitmap and than you can use GetObject function.
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.
ASKER CERTIFIED SOLUTION
Avatar of trongnghia
trongnghia

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.