"The code is exactly
how I would like to write code and the algorithms used are very
efficient and well-documented."
Van T. Dinh, Microsoft MVP
|
|
Class: CPrintDialog
Displaying the Print Common Dialog without using the Microsoft Common Dialog Control
|
Procedure Name
|
Type
|
Description
|
|
(Declarations)
|
Declarations
|
Declarations and private variables for the CPrintDialog class
|
|
Copies
|
Property
|
Gets the number specified in the Copies text box of the printer dialog box.
Note that on printers with built-in support for printing multiple copies, this property always returns 1, but the correct number is printed.
|
|
Flags
|
Property
|
Gets the flags used when displaying the Printer dialog.
The Flags property can have the following values:
priAllPages - Causes the All radio button to be initially selected.
priSelection - Causes the Selection radio button to be initially selected.
priPageNums - Causes the Pages radio button to be initially selected.
priNoSelection - Disables the Selection radio button.
priNoPageNums - Disables the Pages radio button.
priCollate - Causes the Collate check box to be initially checked.
priPrintToFile - Causes the Print to File check box to be initially checked.
priPrintSetup - Causes the Print Setup dialog box to be shown.
priNoWarning - Prevents a warning message from being displayed when there is no default printer.
priReturnDC - Causes the printer dialog to return a hande to a printer device context.
priReturnIC - Causes the printer dialog to return a hande to a printer information context.
priReturnDefault - Unsupported in this class
priShowHelp - Unsupported in this class
priEnablePrintHook - Unsupported in this class
priEnableSetupHook - Unsupported in this class
priEnablePrintTemplate - Unsupported in this class
priEnableSetupTemplate - Unsupported in this class
priEnablePrintTemplateHandle - Unsupported in this class
priEnableSetupTemplateHandle - Unsupported in this class
priUseDevModeCopies - Same as priUseDevModeCopiesAndCollate
priUseDevModeCopiesAndCollate - Disables the Copies edit control if the printer driver does not support multiple copies, and disables the Collate checkbox if the printer driver does not support collation.
priDisablePrintToFile - Disables the Print to File check box.
priHidePrintToFile - Hides the Print to File check box.
priNoNetworkButton - Disables the Network button.
Multiple flags can be specified using the following syntax:
PrintDialog.Flags = PriPageNum Or PriCollate
|
|
FromPage
|
Property
|
Gets the value in the From text box on the printer dialog.
|
|
hDC
|
Property
|
Gets the printer hdc. This property is only valid if the priReturnDC flag is set.
|
|
hWndParent
|
Property
|
Gets the handle to the parent window
|
|
Max
|
Property
|
Gets the maximum printer page number that FromPage and ToPage can return
|
|
Min
|
Property
|
Gets the minimum printer page number that FromPage and ToPage can return
|
|
ToPage
|
Property
|
Sets the value in the From text box on the printer dialog.
You must set the priPageNums flag if you want the dialog to enable the page range selection.
|
|
Class_Initialize
|
Initialize
|
Set initial values to defaults which may be overridden with property settings
|
|
Show
|
Method
|
Displays the Print common dialog
|
Overview of Total Visual SourceBook
The source code in Total Visual
SourceBook includes modules and classes for Microsoft Access, Visual
Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily
add this professionally written, tested, and documented royalty-free code
into your applications to simplify your application development efforts.
Additional Resources
|
|