Click to open or copy the files for the Printer sample.
The Printer sample shows how to print using both the CreateDC and the PrinterDlg methods for acquiring a printer HDC. The user is allowed to print different graphical objects, as well as a complete device font set. An "Abort" dialog box is also implemented.
The Printer sample also does the following:
This sample uses the following keywords:
createdc; deletedc; errmsgbox; getlasterror; getstringres; getstringres2; isdbcsleadbyte; mainwndproc; makeintresource; my_mbslen; outnum; outstr; outstr2; outstr3; printdlg; printthread; registerclass; strcat; winmain; wsprintf