Click here to Skip to main content
15,891,567 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Create compatible bitmap [modified] Pin
CPallini19-Nov-10 1:41
mveCPallini19-Nov-10 1:41 
GeneralRe: Create compatible bitmap Pin
MacCPlus19-Nov-10 2:26
MacCPlus19-Nov-10 2:26 
GeneralRe: Create compatible bitmap [fixed] Pin
CPallini19-Nov-10 3:03
mveCPallini19-Nov-10 3:03 
GeneralRe: Create compatible bitmap Pin
MacCPlus19-Nov-10 4:30
MacCPlus19-Nov-10 4:30 
GeneralRe: Create compatible bitmap Pin
CPallini19-Nov-10 6:34
mveCPallini19-Nov-10 6:34 
GeneralRe: Create compatible bitmap Pin
MacCPlus21-Nov-10 21:55
MacCPlus21-Nov-10 21:55 
GeneralRe: Create compatible bitmap Pin
CPallini21-Nov-10 22:06
mveCPallini21-Nov-10 22:06 
GeneralRe: Create compatible bitmap Pin
MacCPlus22-Nov-10 0:49
MacCPlus22-Nov-10 0:49 
That was exactly what I tried, when I found the "unusual approach": What is different in the RGBQUAD, in the BITMAPHEADER, in the BITMAPINFO if I load the bitmap from the file? You know - so I could assign the exact same properties to my bitmap created with CreateDIBSection. The problem is, I didn't find a way of accessing any of the mentioned structures. The only thing I was able to find out after using LoadImage() was this (also see code from original post):

BITMAP bm;
cBmp.GetBitmap(&bm);


bm was then filled with these values

bmType 0 long
bmWidth 320 long
bmHeight 180 long
bmWidthBytes 320 long
bmPlanes 1 unsigned short
bmBitsPixel 8 unsigned short
bmBits 0x07a10000 void *

No surprise there. I assigned the same values (bmPlanes, bmBitsPixel etc.) to BITMAPINFO *lpInfo (also see original post).
Is there a way of retrieving a "proper" BITMAPINFO or BITMAPINFOHEADER from the bitmap loaded with LoadImage()?

Mac
GeneralRe: Create compatible bitmap Pin
CPallini22-Nov-10 1:55
mveCPallini22-Nov-10 1:55 
GeneralRe: Create compatible bitmap Pin
MacCPlus23-Nov-10 1:43
MacCPlus23-Nov-10 1:43 
GeneralRe: Create compatible bitmap Pin
CPallini23-Nov-10 1:52
mveCPallini23-Nov-10 1:52 
GeneralRe: Create compatible bitmap Pin
MacCPlus23-Nov-10 2:25
MacCPlus23-Nov-10 2:25 
QuestionAutomation tool for MFC Dialog based applications Pin
kapardhi18-Nov-10 19:37
kapardhi18-Nov-10 19:37 
AnswerRe: Automation tool for MFC Dialog based applications Pin
David Crow19-Nov-10 4:15
David Crow19-Nov-10 4:15 
QuestionHow to Load Tiff File using LoadImage? Pin
002comp18-Nov-10 18:03
002comp18-Nov-10 18:03 
AnswerRe: How to Load Tiff File using LoadImage? Pin
Luc Pattyn18-Nov-10 18:42
sitebuilderLuc Pattyn18-Nov-10 18:42 
GeneralRe: How to Load Tiff File using LoadImage? Pin
CPallini19-Nov-10 0:59
mveCPallini19-Nov-10 0:59 
GeneralRe: How to Load Tiff File using LoadImage? Pin
Luc Pattyn19-Nov-10 1:32
sitebuilderLuc Pattyn19-Nov-10 1:32 
GeneralOT Pin
CPallini19-Nov-10 1:55
mveCPallini19-Nov-10 1:55 
GeneralRe: OT Pin
Luc Pattyn19-Nov-10 1:57
sitebuilderLuc Pattyn19-Nov-10 1:57 
GeneralRe: OT Pin
CPallini19-Nov-10 1:59
mveCPallini19-Nov-10 1:59 
QuestionRe: the C/C++/MFC forum of all places Pin
Luc Pattyn19-Nov-10 2:07
sitebuilderLuc Pattyn19-Nov-10 2:07 
AnswerRe: the C/C++/MFC forum of all places [modified] Pin
CPallini19-Nov-10 2:21
mveCPallini19-Nov-10 2:21 
AnswerRe: How to Load Tiff File using LoadImage? Pin
Sarath C18-Nov-10 18:50
Sarath C18-Nov-10 18:50 
QuestionCallback Function for Timers in VC6......?? Pin
AmbiguousName18-Nov-10 8:43
AmbiguousName18-Nov-10 8:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.