Bewerken

Delen via


Methods for specifying pages

Important

The modern print platform is Windows' preferred means of communicating with printers. We recommend that you use Microsoft's IPP inbox class driver, along with Print Support Apps (PSA), to customize the print experience in Windows 10 and 11 for printer device development.

For more information, see Modern print platform and the Print support app design guide.

An application can use any of three methods to specify property sheet pages to CPSUI. Each of the following methods involves calling CPSUI's ComPropSheet function, specifying one of the ComPropSheet function codes.

  • Supplying a COMPROPSHEETUI structure

    If an application describes a property sheet page by passing a COMPROPSHEETUI structure to ComPropSheet, it can:

  • Supplying a PROPSHEETPAGE structure

    A PROPSHEETPAGE structure can be used to describe a property sheet page, if the page cannot be constructed using the common (standard) dialogs available when using a COMPROPSHEETUI structure. Printer interface DLLs typically should not need to use this method.

  • Supplying a callback function

    An application can pass ComPropSheet the address of a PFNPROPSHEETUI-typed callback function, which CPSUI immediately calls. The callback function is responsible for calling ComPropSheet itself to create property sheet pages.

    The print spooler uses this method to inform CPSUI of the existence a printer interface DLL's DrvDocumentPropertySheets and DrvDevicePropertySheets functions. Likewise, the Unidrv and Pscript drivers use the technique to inform CPSUI of the existence of IPrintOemUI::DocumentPropertySheets and IPrintOemUI::DevicePropertySheets COM methods in user interface plug-ins.

Whichever method is used for specifying new pages, the pages must be assigned to a group parent by passing a group parent handle to the ComPropSheet function.