Bewerken

Delen via


Dialog Box Procedures and CPSUI

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.

A dialog box procedure is a callback function that handles window messages sent by the system. This type of page event callback is required if you are creating a customized property sheet page that is not supplied by CPSUI. (You can also use dialog box procedures with CPSUI-supplied pages and templates, but use of a CPSUI message handler is recommended.) For more information about dialog box procedures, see DialogProc in the Microsoft Windows SDK documentation. Pointers to dialog box procedures are declared using the DLGPROC pointer type, also described in the Windows SDK documentation.

For all property sheet pages created using CPSUI, window messages are first intercepted by CPSUI before being passed to the application-supplied dialog box procedure. If the page was defined using a CPSUI-supplied template, the application-supplied dialog procedure can supply a return value indicating that CPSUI should process the message.

A dialog box procedure can use the SetCPSUIUserData and GetCPSUIUserData functions to store and retrieve an application-supplied value.

For more information about using dialog box procedures with CPSUI, see the Remarks section for DLGPAGE.