Loading and printing bitmaps in Dialog Application

How can i succesfully load (without drawing the bmp to the dialog box)and print bitmap in a dialog box application?
jopoyAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
MaizlishConnect With a Mentor Commented:
Here is a sequence :
1.Create compatible memory device ( for dialog box or printer ) - see CreateCompatibleDevice documentation

2.Read the BMP file

3.Create compatible bitmap ( CreateCompatibleBitmap ) and initialize it with the data read from the file

4.Select the bitmap into the device you have created in the step 1 - see SelectObject

Now you have bitmap selected in the invisible device context - and you are free to do anything with it - even sending to printer .

Hope it helps ,
Oleg

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.