Click here to Skip to main content
15,904,503 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Displaying an Image(JPG,GIF) etc Pin
Mark Salsbery10-Aug-07 9:41
Mark Salsbery10-Aug-07 9:41 
GeneralRe: Displaying an Image(JPG,GIF) etc Pin
simon alec smith10-Aug-07 10:02
simon alec smith10-Aug-07 10:02 
QuestionRe: Displaying an Image(JPG,GIF) etc Pin
Mark Salsbery10-Aug-07 10:18
Mark Salsbery10-Aug-07 10:18 
AnswerRe: Displaying an Image(JPG,GIF) etc Pin
simon alec smith11-Aug-07 2:53
simon alec smith11-Aug-07 2:53 
GeneralRe: Displaying an Image(JPG,GIF) etc Pin
Mark Salsbery11-Aug-07 8:59
Mark Salsbery11-Aug-07 8:59 
AnswerRe: Displaying an Image(JPG,GIF) etc Pin
Hamid_RT10-Aug-07 19:00
Hamid_RT10-Aug-07 19:00 
GeneralRe: Displaying an Image(JPG,GIF) etc Pin
simon alec smith11-Aug-07 3:38
simon alec smith11-Aug-07 3:38 
QuestionHow to print from .bmp file image in memory Pin
bions10-Aug-07 9:03
bions10-Aug-07 9:03 
I have the exact image of a .bmp file in memory, loaded from a database. How can I create a valid CBitmap from it and get it to print?

I can load the .bmp file locally using LoadImage(...LR_LOADFROMFILE...), which returns a valid HBITMAP handle, and it prints fine. But when I use CreateBitmap() et al. and try to load the instance with the in-memory bitmap info from BITMAPFILEHEADER and BITMAPINFOHEADER (width, height, planes etc.) it fails when I try to SelectObject() into a temporary DC.

How can I duplicate all of the functions of LoadImage() when the source is neither a resource nor an actual file, but rather an image of the .bmp file in memory? The goal is to end up with a valid HBITMAP handle that can then be Selected into a DC and printed.

Does anyone have any code examples for this kind of operation?

Thanks.



AnswerRe: How to print from .bmp file image in memory Pin
Mark Salsbery10-Aug-07 9:37
Mark Salsbery10-Aug-07 9:37 
AnswerRe: How to print from .bmp file image in memory Pin
bions13-Aug-07 7:58
bions13-Aug-07 7:58 
GeneralRe: How to print from .bmp file image in memory Pin
Mark Salsbery13-Aug-07 10:02
Mark Salsbery13-Aug-07 10:02 
Questionneed quick help Pin
klutez12310-Aug-07 8:15
klutez12310-Aug-07 8:15 
AnswerRe: need quick help Pin
Mark Salsbery10-Aug-07 8:18
Mark Salsbery10-Aug-07 8:18 
JokeRe: need quick help Pin
David Crow10-Aug-07 8:48
David Crow10-Aug-07 8:48 
GeneralRe: need quick help Pin
Mark Salsbery10-Aug-07 10:01
Mark Salsbery10-Aug-07 10:01 
Questionhow can i send data in mysql data base through mfc dialog based application Pin
rajneshmalik10-Aug-07 4:27
rajneshmalik10-Aug-07 4:27 
AnswerRe: how can i send data in mysql data base through mfc dialog based application Pin
led mike10-Aug-07 4:38
led mike10-Aug-07 4:38 
QuestionAccessing a dlls function from an exe and ASP Pin
emmmatty110-Aug-07 4:23
emmmatty110-Aug-07 4:23 
AnswerRe: Accessing a dlls function from an exe and ASP Pin
sthotakura10-Aug-07 4:43
sthotakura10-Aug-07 4:43 
QuestionColumn width problem Pin
paper6710-Aug-07 3:46
paper6710-Aug-07 3:46 
AnswerRe: Column width problem Pin
Jim Crafton10-Aug-07 4:22
Jim Crafton10-Aug-07 4:22 
QuestionToolbar Drop-down Button Width [modified] Pin
T-Mac-Oz10-Aug-07 3:38
T-Mac-Oz10-Aug-07 3:38 
AnswerRe: How To Monitor The File in MFC Pin
David Crow10-Aug-07 3:41
David Crow10-Aug-07 3:41 
QuestionOverriding registry default value's data programmatically Pin
Mushtaque Nizamani10-Aug-07 3:12
Mushtaque Nizamani10-Aug-07 3:12 
AnswerRe: Overriding registry default value's data programmatically Pin
David Crow10-Aug-07 3:21
David Crow10-Aug-07 3:21 

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.