Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending a CBitmap to a printer

Status
Not open for further replies.

mp4771

Programmer
Mar 5, 2001
2
GB
I have set up a dialog based project in ms visual c++.

What i want to be able to do is on a button press, load a bitmap, display it, and print it out on a local printer.

I can load and display the bitmap, but i just dont know how to get it to be printed.

any ideas ?

cheers in advance.
 
get the printer DC and draw in it like in Window DC. John Fill
1c.bmp


ivfmd@mail.md
 
For your first consideration.

The print button as well as print preview is a gift to you in the windows application file menu. The data from your window's application gets dumped into the printer device context automatically.

Next consideration.

look into device context under the topic of GDI. You must create a printer device context. If you have a device independent bitmap (dib), that will have to be converted to a (ddb) device dependent bitmap. When the conversion take place, the ddb should already be set accordingly with the printer device context.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top