OWLNext 7.0
Borland's Object Windows Library for the modern age
|
TPrintDialog displayed a modal print or a print setup dialog box for 16-bit applications.
For 32-bit applications, it displays a modal print or a page setup dialog. The print dialog box lets you print a document. The print setup dialog box lets you configure the printer and specify additional print job characteristics. The page setup dialog lets you specify page settings, such as margins, and paper orientation. You can also use TPrinter and TPrintout to provide support for printer dialog boxes. TPrintDialog uses the TPrintDialog::TData structure to initialize the dialog box with the user's printer options, such as the number of pages to print, the output device, and so on.
TPrintDialog::TData's members, described in the following table, let you control the appearance and behavior of the printer common dialog boxes:
TData member | Type | Description |
FromPage | int | The first page of output, if the PD_PAGENUMS flag is specified. On input, it specifies the default first page. On output, it specifies the first page the user chose. |
ToPage | int | The last page of output, if the PD_PAGENUMS flag is specified. On input, it specifies the default last page number. On output, it specifies the last page number the user chose. |
MinPage | int | The fewest number of pages the user can choose. |
MaxPage | int | The largest number of pages the user can choose. |
Copies | int | The number of copies to print. On input, the default number of copies. On output, the number of copies the user actually chose. |
In the following example, CmFilePrint executes a standard print job common dialog box and uses the information in TPrintDialog::TData to determine what to print. CmFilePrintSetup adds a flag to bring up the print setup dialog box automatically.