VpePrintDoc

<< Click to Display Table of Contents >>

Navigation:  Printing Functions >

VpePrintDoc

Previous pageReturn to chapter overviewNext page

[Windows platform only; not supported by the Community Edition]

Prints the document. You may not close your application or the document until VPE has finished all print-jobs. Your application code will hold at the VpePrintDoc() call as long as all pages are printed.  But your application will still be able to receive window messages.

During printing, VPE will disable the parent window of the preview supplied as parameter in VpeOpenDoc(). If the parent window is not the main window of your application, or if your application is in any other way able to receive and to respond to messages, it is your responsibility to disable your application, or to take care that your print-functions (for example a button or a menu entry that invokes printing) are stopped from being reentered.

void VpePrintDoc(

VpeHandle hDoc,

int with_setup

)

VpeHandle hDoc

Document Handle

int with_setup

Value

Description

True

show printer setup-dialog

False

do not show printer setup-dialog

Remarks:

After calling VpePrintDoc(), code execution is suspended until the document has been completely printed. So the following command sequence is absolutely valid:

VpePrintDoc(hDoc, True or False)

VpeCloseDoc(hDoc)

The document will be closed AFTER it has been printed (or, if the print has been aborted by the user, which can be realized with the VPE_PRINT event). But due to the event-driven mechanism of Windows,  your application window is still "alive" and other actions can take place (like button clicks), and the related code will be executed.