Advertisement Jump to content
Sign in to follow this  

Using the printer

This topic is 5184 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
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!