Important: The information in this document is obsolete and should not be used for new development.
PrValidate
When you have aTPrintrecord, whether an existing one from the current document or a new one you have just created, you can use thePrValidatefunction to ensure that the contents of the specifiedTPrintrecord are compatible with the current version of the printer driver for the current printer.
FUNCTION PrValidate (hPrint: THPrint): Boolean;
hPrint- A handle to a
TPrintrecord, which may be a new record or an existing one from a document.DESCRIPTION
If theTPrintrecord is valid, thePrValidatefunction returnsFALSE, meaning there is no change. If the record is invalid, the function returnsTRUEand the Printing Manager adjusts the record with the default values stored in the printer resource file for the current printer.The
PrValidatefunction also makes sure that all the information in theTPrintrecord is internally self-consistent and updates theTPrintrecord as necessary. These changes do not affect the function's Boolean result.If you have just created a
TPrintrecord by using thePrintDefaultprocedure, you do not need to callPrValidate. ThePrintDefaultprocedure does this automatically.SPECIAL CONSIDERATIONS
You should never callPrValidatebetween the pages of a document. This restriction holds as well for thePrStlDialogandPrJobDialogfunctions (described on page 9-58 and page 9-59, respectively) and thePrintDefaultprocedure (described on page 9-56), which callPrValidate.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for thePrValidatefunction are
Trap macro Selector _PrGlue $52040498 SEE ALSO
For examples of the use ofPrValidate, see Listing 9-1 on page 9-15 and Listing 9-2 on page 9-18.