Chapter 24 Printing

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

This chapter covers the following topics:

Printing in the Windows environment

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 application, PrntFile, that
illustrates many of the concepts explained in the chapter.