CPageSetupDialog Class
Encapsulates the services provided by the Windows common OLE Page Setup dialog box with additional support for setting and modifying print margins.
class CPageSetupDialog : public CCommonDialog
Members
Public Constructors
Name |
Description |
---|---|
Constructs a CPageSetupDialog object. |
Public Methods
Name |
Description |
---|---|
Creates a device context for printing. |
|
Displays the dialog box and allows the user make a selection. |
|
Returns the device name of the printer. |
|
Returns the current DEVMODE of the printer. |
|
Returns the driver used by the printer. |
|
Returns the current margin settings of the printer. |
|
Returns the paper size of the printer. |
|
Returns the output port name. |
|
Called by the framework to render a screen image of a printed page. |
|
Called by the framework before rendering a screen image of a printed page. |
Public Data Members
Name |
Description |
---|---|
A structure used to customize a CPageSetupDialog object. |
Remarks
This class is designed to take the place of the Print Setup dialog box.
To use a CPageSetupDialog object, first create the object using the CPageSetupDialog constructor. Once the dialog box has been constructed, you can set or modify any values in the m_psd data member to initialize the values of the dialog box's controls. The m_psd structure is of type PAGESETUPDLG.
After initializing the dialog box controls, call the DoModal member function to display the dialog box and allow the user to select print options. DoModal returns whether the user selected the OK (IDOK) or Cancel (IDCANCEL) button.
If DoModal returns IDOK, you can use several of CPageSetupDialog's member functions, or access the m_psd data member, to retrieve information input by the user.
Note
After the common OLE Page Setup dialog box is dismissed, any changes made by the user will not be saved by the framework. It is up to the application itself to save any values from this dialog box to a permanent location, such as member of the application's document or application class.
Inheritance Hierarchy
CPageSetupDialog
Requirements
Header: afxdlgs.h