IPrintDialogCallback interface

Provides methods that enable an application to receive notifications and messages from the PrintDlgEx function while the Print Property Sheet is displayed.

When to implement

Implement the IPrintDialogCallback interface if you are using the PrintDlgEx function and want to receive callback notifications and messages. You must implement the interface if you specify a custom dialog box template with application-specific controls. The HandleMessage method enables you to receive messages for the custom dialog box.

When you call PrintDlgEx, you can specify a pointer to your callback object in the lpCallback member of the PRINTDLGEX structure.

Typically, the callback object also contains the IObjectWithSite class. If you specify a callback object, PrintDlgEx calls QueryInterface for both IID_IPrintDialogCallback and IID_IObjectWithSite. If the callback object implements the IObjectWithSite interface, PrintDlgEx calls the IObjectWithSite::SetSite method to pass a pointer to an IPrintDialogServices interface to the application. The IPrintDialogCallback methods can use the IPrintDialogServices interface to retrieve information about the currently selected printer.

When to use

Applications do not call the IPrintDialogCallback methods. The PrintDlgEx function calls the interface methods to pass information to the application.


The IPrintDialogCallback interface inherits from the IUnknown interface. IPrintDialogCallback also has these types of members:


The IPrintDialogCallback interface has these methods.


Called by PrintDlgEx to give your application an opportunity to handle messages sent to the child dialog box in the lower portion of the General page of the Print Property Sheet. The child dialog box contains controls similar to those of the Print dialog box.


Called by PrintDlgEx when the system has finished initializing the General page of the Print Property Sheet.


Called by PrintDlgEx when the user selects a different printer from the list of installed printers on the General page of the Print Property Sheet.



Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]


Commdlg.h (include Windows.h)



See also