Contents Previous Page Next Page
IContinueCallback::FContinuePrinting

Answer whether a given lengthy printing operation should continue.

HRESULT FContinuePrinting(

    LONG 
cPagesPrinted,              // Total pages printed at time of call             
                                                                                        
    LONG nCurrentPage,               // Number of page currently being printed          
                                                                                        
    LPOLESTR pszPrintStatus          // Pointer to status message about print job       
                                                                                        
   );                                                                                   
                                                                                        

Parameters

cPagesPrinted

The total number of pages that have been printed at the time the object receives a call to IContinueCallback::FContinuePrinting.

nCurrentPage

The page number of the page being printed at the time the object receives a call to IContinueCallback::FContinuePrinting.

pszPrintStatus

Pointer to message about the current status of the print job. The object being printed may or may not display this message to the user. May be NULL.

Return Values

S_OK

Continue the printing operation.

S_FALSE

Cancel the print job as soon as possible.

E_UNEXPECTED

An unknown error occurred.

Remarks

Implementations of IPrint call back on this method at periodic intervals during the printing process. The IPrint implementation should call back at least after printing each page, so that its client can, if necessary, display useful visual feedback to the user. Your Iprint implementation can legally call back multiple times with the same cPagesPrinted and nCurrentPage values, which is sometimes useful when a page being printed is complex and it is appropriate to give a user an opportunity to cancel mid-page.

See Also

IPrint