Jump to content
  • Advertisement
Sign in to follow this  
theadamSGT

printing

This topic is 4833 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Yes.

For more information you might want to mention some basic things as what operating system you are using or what programming language.

Share this post


Link to post
Share on other sites
In Windows in order to print, you acquire a device context to the printer and use GDI functions to render to the device context.

To get the device context first you can either call PrintDlgEx() or call either EnumPrinters() or GetPrinter() to obtain a printer name and use CreateDC() on the printer name to obtain the device context.

Once you have a device context, you register an AbortProc() and call StartDoc() to start the printing process. From there you do a sequence of StartPage(), GDI calls and EndPage() to print the individual pages. When done, call EndDoc().

Share this post


Link to post
Share on other sites
Quote:
Original post by theadamSGT
thanks do you have one in c++


The C++ language itself doesn't have any "printing" functions. That task, as with many others, is delegated to the operating system in the manner SiCrane described above - in your case Win32 API functions.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!