Bewerken

Delen via


CPSUI-Supplied Functions

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.

CPSUI provides the following two important functions for applications:

  • CommonPropertySheetUI

    The CommonPropertySheetUI function is CPSUI's entry point. The function causes property sheet pages to be created and displayed, and then allows them to be viewed and modified by a user.

    When an application calls CommonPropertySheetUI, it supplies the address of a page creation callback that describes the pages to be created. CPSUI calls this callback to obtain the page descriptions. Then it displays the pages, allows the application user to modify values contained in the page, and delivers modified values to the application using page event callbacks. The CommonPropertySheetUI function doesn't return until the user has dismissed the property sheet by clicking on OK or Cancel.

    Note that printer interface DLLs do not call this function; it is called by the print spooler.

  • ComPropSheet

    The ComPropSheet function is the means by which applications describe property sheet pages to CPSUI, so that CPSUI can create and display them. CPSUI applications call this function from within page creation callbacks. Typically, a page description includes a pointer to a page event callback, which CPSUI will call when the application user modifies page values.

For a detailed description of when these functions are called, see Using CPSUI with Printer Drivers.

Two additional CPSUI-supplied functions, SetCPSUIUserData and GetCPSUIUserData, can be used by application-supplied dialog box procedures to store and retrieve an application-supplied value.