Jump to content
  • Advertisement
Sign in to follow this  
theadamSGT

printing

This topic is 4886 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!