• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 270
  • Last Modified:

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?
0
jopoy
Asked:
jopoy
1 Solution
 
MaizlishCommented:
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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now