IPrintIPrint*
*Contents  *Index  *Topic Contents
*Previous Topic: IOleDocumentView::UIActivate
*Next Topic: IPrint::GetPageInfo

IPrint

The IPrint interface enables compound documents in general and Active Documents in particular to support programmatic printing. When 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.

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.

Methods in Vtable Order
SetInitialPageNum Sets the page number of the first page.
GetPageInfo Retrieves the number of pages and the number of the first page.
Print Prints the object's persistent state.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.