Chapter 12 Printing

Most applications provide a way for users to get printed copies of their program data. With most operating systems, your application must deal with the varied capabilities and requirements of many different printers. With the Microsoft Windows operating system, your application need not provide any printer-specific code; it can simply print on the current printer. Windows, and the Windows printer drivers, translate your application's print request to information any printer can use.

This chapter covers the following topics:

Printing with Windows

Getting information about the printer

Printing a line of text

Printing a bitmap

Processing printing errors

Canceling print operations

Using banding to print graphics images

This chapter also explains how to create a sample Windows 3.1 application, PrntFile, that illustrates many of the concepts explained in the chapter.