Export (0) Print
Expand All

IPrint interface

Enables compound documents in general and active documents in particular to support programmatic printing.

When to implement

Implementing IPrint is optional. You usually implement IPrint on a view object.

When to use

Call the methods of IPrint when you want an object to print its current state. Using this interface, a caller can tell the object to print itself, set the initial page number of the printed document, and obtain both the number of pages and the number of the first page to be printed.

Members

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

Methods

The IPrint interface has these methods.

MethodDescription
GetPageInfo

Retrieves the number of a document's first page and the total number of pages.

Print

Prints an object on the specified printer, using the specified job requirements.

SetInitialPageNum

Sets the page number of the first page of a document.

 

Remarks

After a document is loaded, containers and other clients can call IPrint::Print to instruct a document to print itself, specifying printing control flags, the target device, the particular pages to print, and other options. The client can control the continuation of printing by calling the IContinueCallback interface.

An object that implements IPrint registers itself with the Printable key stored under its CLSID as follows:

HKEY_CLASSES_ROOT\CLSID\{...}\Printable

Callers determine whether a particular object class supports programmatic printing of its persistent state by looking in the registry for this key.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

DocObj.h

IDL

DocObj.idl

IID

IID_IPrint is defined as b722bcc9-4e68-101b-a2bc-00aa00404770

 

 

Community Additions

ADD
Show:
© 2014 Microsoft