Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 9 - Printing Manager / Printing Manager Reference
Printing Manager Routines / Initializing and Validating TPrint Records


PrValidate

When you have a TPrint record, whether an existing one from the current document or a new one you have just created, you can use the PrValidate function to ensure that the contents of the specified TPrint record are compatible with the current version of the printer driver for the current printer.

FUNCTION PrValidate (hPrint: THPrint): Boolean;
hPrint
A handle to a TPrint record, which may be a new record or an existing one from a document.
DESCRIPTION
If the TPrint record is valid, the PrValidate function returns FALSE, meaning there is no change. If the record is invalid, the function returns TRUE and the Printing Manager adjusts the record with the default values stored in the printer resource file for the current printer.

The PrValidate function also makes sure that all the information in the TPrint record is internally self-consistent and updates the TPrint record as necessary. These changes do not affect the function's Boolean result.

If you have just created a TPrint record by using the PrintDefault procedure, you do not need to call PrValidate. The PrintDefault procedure does this automatically.

SPECIAL CONSIDERATIONS
You should never call PrValidate between the pages of a document. This restriction holds as well for the PrStlDialog and PrJobDialog functions (described on page 9-58 and page 9-59, respectively) and the PrintDefault procedure (described on page 9-56), which call PrValidate.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the PrValidate function are
Trap macroSelector
_PrGlue$52040498

SEE ALSO
For examples of the use of PrValidate, see Listing 9-1 on page 9-15 and Listing 9-2 on page 9-18.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996