November 1998
Intermediate to advanced
1520 pages
37h 53m
English
Printing from a Windows program usually involves more overhead than shown in the FORMFEED program, as well as some GDI calls to actually print something. Let’s write a program that prints one page of text and graphics. We’ll start with the method shown in the FORMFEED program and then add some enhancements. We’ll be looking at three versions of this program called PRINT1, PRINT2, and PRINT3. To avoid a lot of duplicated source code, each of these programs will use the GETPRNDC.C file shown earlier and functions contained in the PRINT.C file, which is shown in Example 13-4.
Example 13-4. The PRINT.C file used in the PRINT1, PRINT2, and PRINT3 programs.
PRINT.C /*----------------------------------------------------------- ...Read now
Unlock full access