Customizing the Print Property Sheet

[This is preliminary documentation and subject to change.]

You can customize the Print property sheet in the following ways:

You cannot change the upper portion of the General page. You cannot change property pages provided by the printer driver.

    To provide a custom template for the General page
  1. Create a custom template for the lower portion of the General page by modifying the PRINTDLGEXORD template specified in the PRNSETUP.DLG file. The custom template must be the same size as the default template. The control identifiers used in the default Print dialog template are defined in the DLGS.H file.
  2. Use the PRINTDLGEX structure to enable the template as follows:
  3. If you use a custom template to define additional controls, you must provide a callback object to process input for your controls. The callback object implements a IPrintDialogCallback::HandleMessage method which receives messages sent to the custom dialog box.
    To provide additional property pages
  1. Use the CreatePropertySheetPage function to create the additional pages.
  2. Use the lphPropertyPages member of the PRINTDLGEX structure to specify an array of handles to the additional pages.

    The dialog box procedures specified when you created each page process messages sent to the pages.

  3. You might want to provide a callback object that implements the IObjectWithSite interface. The PrintDlgEx function uses this interface to pass to the application a pointer to an IPrintDialogServices interface. The dialog box procedures for the additional property pages can use this interface to retrieve information about the currently selected printer.