|
|
|
IPrint Interface |
|
IID_IPrint |
{B722BCC9-4E68-101B-A2BC-00AA00404770} |
|
The IPrint interface enables compound documents in general and active documents in particular to support programmatic printing. Once 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.
|
|
Methods in VTable order |
|
|
IUnknown Methods |
Description |
|
QueryInterface |
Returns pointers to supported interfaces. |
|
AddRef |
Increments reference count. |
|
Release |
Decrements reference count. |
|
IPrint Methods |
Description |
|
SetInitialPageNum |
Sets number of first page. |
|
GetPageInfo |
Obtains number of pages and number of first page. |
|
|
Prints object's persistent state. |
|
PRINTFLAG Enumeration |
|
' Indicates that the printing process can interact with the user. %PRINTFLAG_MAYBOTHERUSER = 1
' Indicates the normal print dialog box must be used.
' The user may change the printer.
' The document must recompose itself to the printer.
' Only simulate printing.
' Force properties
' Print to a file.
|
|
SetInitialPageNum |
|
FUNCTION IPrint_SetInitialPageNum ( _ BYVAL pthis AS DWORD PTR _ , BYVAL nFirstPage AS LONG _ ) AS
LONG
LOCAL HRESULT AS LONG
|
|
GetPageInfo |
|
FUNCTION IPrint_GetPageInfo ( _ BYVAL pthis AS DWORD PTR _ , BYREF nFirstPage AS LONG _ , BYREF pcPages AS LONG _ ) AS LONG
LOCAL HRESULT AS LONG
|
|
|
|
FUNCTION IPrint_Print ( _ BYVAL pthis AS DWORD PTR _ , BYVAL grfFlags AS DWORD _ , BYREF pptd AS DVTARGETDEVICE _ , BYREF pstgmOptions AS STGMEDIUM _ , BYVAL pcallback AS DWORD _ , BYVAL nFirstPage AS LONG _ , BYREF pcPagesPrinted AS LONG _ , BYREF pnLastPage AS LONG _ ) AS LONG
LOCAL HRESULT AS LONG
|
Page last updated on Monday, 03 April 2006 20:26:37 +0200