IPrintDialogCallback

[This is preliminary documentation and subject to change.]

The IPrintDialogCallback interface enables 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 IObjectWithSite, PrintDlgEx calls the 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.

Methods in VTable Order

IUnknown Methods

QueryInterface
AddRef
Release

IPrintDialogCallback Methods

Method Description
InitDone Called when the system has finished initializing the General page of the Print property sheet.
SelectionChange Called when the user selects a different printer from the list of installed printers in the Print property sheet.
HandleMessage Called to pass messages sent to the child dialog box in the lower portion of the General page.

See Also

IObjectWithSite, IPrintDialogServices, PrintDlgEx, PRINTDLGEX