IPrintDialogServices interface

Provides methods that enable an application using the PrintDlgEx function to retrieve information about the currently selected printer.

When to implement

Applications do not implement the IPrintDialogServices interface. The PrintDlgEx function implements this interface.

When to use

Applications that call the PrintDlgEx function can use the IPrintDialogServices interface to retrieve information about the currently selected printer while the Print property sheet is displayed. The IPrintDialogServices interface is useful for applications that implement the IPrintDialogCallback interface to process messages and notifications for the child dialog box in the lower portion of the General page.

The IPrintDialogServices interface is also useful for applications that create additional pages to follow the General page. The dialog box procedures for the additional pages can call IPrintDialogServices methods.

To retrieve a pointer to the IPrintDialogServices interface, implement a callback object that contains the IObjectWithSite class. When you call PrintDlgEx, you can specify a pointer to your callback object in the lpCallback member of the PRINTDLGEX structure. PrintDlgEx calls the IObjectWithSite::SetSite method to pass a pointer to an IPrintDialogServices interface to the application.

Members

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

Methods

The IPrintDialogServices interface has these methods.

MethodDescription
GetCurrentDevMode

Fills a DEVMODE structure with information about the currently selected printer for use with PrintDlgEx.

GetCurrentPortName

Retrieves the name of the current port for use with PrintDlgEx.

GetCurrentPrinterName

Retrieves the name of the currently selected printer, for use with PrintDlgEx.

 

Remarks

This printer is indicated on the list of installed printers on the General page of the Print Property Sheet.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Commdlg.h (include Windows.h)

DLL

Comdlg32.dll

 

 

Community Additions

ADD
Show: