PrJobDialog
PrJobDialog Process user interaction for "Print..." menu item
#include <PrintTraps.h> Printing Manager
THPrint hPrtRec ; handle leading to a TPrint structure
returns Did user choose OK in the dialog?
PrJobDialog processes a standard dialog to obtain such print-job specific
information as the number of copies and the range of pages to print. Call this
function when the user selects "Print..." from your "File" menu.
hPrtRec is a handle leading to a 120-byte TPrint structure. If the return
value is TRUE, the TPrint fields have been set as requested by the
user and the user has selected the OK button.
Returns: a Boolean; it indicates whether the user has approved the contents of
hPrtRec as reflected in the dialog. It is one of:
FALSE The user selected Cancel; no fields were changed.
TRUE The user selected OK; print record is valid. Proceed with
printing.

Notes: The Printing Manager pre-sets the number of copies to 1, and the page
range as 1 to 9999 before executing the dialog. Other dialog values are
taken from the most recently-used print record. They do not necessarily
reflect any values you have pre-set in hPrtRec.
Upon return from this call, you may wish to examine the following fields
of hPrtRec to guide your printing loop:
prJob.iFstPage Page number of first page to print (1-based)
prJob.iLstPage Page number of last page to print (1-based)
prJob.iCopies Number of copies to print
After printing, you should examine prJob.bJDocLoop to determine whether
the document was spooled to disk (and therefore needs to be printed via
PrPicFile). See PrOpenDoc for an example.
Note that the print record's pIdleProc is cleared to NIL by this call, so if
you want to perform any background task while printing (such as displaying
the current page number or watching for the click of a Pause button), you
must set pIdleProc after calling both PrJobDialog and PrOpenDoc.
Remember that PrOpen must be called prior to this or any other Printing
Manager calls.
Use PrStlDialog to let the user set page-setup fields such as the type of
paper to use and the page orientation.