OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Windows sees a printout as a series of pages, so your printout object must turn a document into a series of page images for Windows to print.
Just as you use window objects to paint images for Windows to display on the screen, you use printout objects to paint images on the printer.
Your printout object needs to be able to
In addition to the member functions you use doing the above tasks, printout objects have several other member functions you can override as needed. BeginPrinting and EndPrinting are called before and after any documents are printed, respectively. If you need special setup code, you can put it in BeginPrinting and undo it in EndPrinting.
Printing of pages takes place sequentially. That is, the printer calls PrintPage for each page in sequence. Before the first call to PrintPage, however, the printer object calls BeginDocument, passing the numbers of the first and last pages it prints. If your document needs to prepare to begin printing at a page other than the first, override BeginDocument. Call the corresponding member function, EndDocument, after the last page prints.
If multiple copies are printed, the multiple BeginDocument/EndDocument pairs can be called between BeginPrinting and EndPrinting.