CPSUI provides the following two important functions for applications:
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.
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.