Jump to content
  • Advertisement
Sign in to follow this  
xIshtarx

Using the printer

This topic is 5001 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

Hi every1 Im treing to print some text with a printer. I checked msdn and i think i have to use: StartDoc(); It takes 2 parameters a HDC.. what the hell is a HDC?? and a DOCINFO. I fill in the DOCINFO like his: DOCINFO info; info.cbSize=sizeof(DOCINFO); info.fwType=0; info.lpszDatatype=NULL; info.lpszDocName="document.doc"; info.lpszOutput=NULL; Still needed a HDC, so i searched and found this: HDC hdc; CPrintDialog dlg(FALSE); if (dlg.DoModal() == IDOK) { HDC hdc = dlg.GetPrinterDC(); ASSERT(hdc); CDC::FromHandle(hdc)->DeleteDC(); } Copied it from msdn :). Then i needed to #include <afxdlgs.h> I compiled it and now i got this: afxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex I dont want any threads or stuff lol... :S Some1 help me out plz, i really dont have a clue what im doing here... Thanks in advance xIshtarx

Share this post


Link to post
Share on other sites
Advertisement
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!