Important: The information in this document is obsolete and should not be used for new development.
PrCtlCall
You can use thePrCtlCallprocedure to send various requests to the current printer driver.
PROCEDURE PrCtlCall (iWhichCtl: Integer; lParam1: LongInt; lParam2: LongInt; lParam3: LongInt);
iWhichCtl- A value that indicates the operation to perform. You can use these constants in this parameter:
CONST iPrBitsCtl = 4; {print a bitmap object} iPrIOCtl = 5; {perform text streaming} iPrEvtCtl = 6; {print object specified in } { lParam1 parameter} iPrDevCtl = 7; {device control command}
lParam1- The use of this parameter varies according to the value in the
iWhichCtlparameter. See the following paragraphs for this information.lParam2- The use of this parameter varies according to the value in the
iWhichCtlparameter. See the following paragraphs for this information.lParam3- The use of this parameter varies according to the value in the
iWhichCtlparameter. See the following paragraphs for this information.DESCRIPTION
ThePrCtlCallprocedure performs the operation indicated by theiWhichCtlparameter. Depending on the operation,PrCtlCallmay also use information in thelParam1,lParam2, andlParam3parameters. ThePrCtlCallprocedure calls the printer driver's control routine. Instead of sending the low-level calls to the printer driver, thePrCtlCallprocedure converts the call into its high-level equivalent before execution.You can use the
PrCtlCallprocedure with theiPrBitsCtlcontrol constant when you want to print bitmaps. In this case, you should supply the parameters toPrCtlCallwith the following information:
You can use the
iWhichCtl- The constant
iPrBitsCtl. This constant allows you to send all or part of a QuickDraw bitmap directly to the printer.lParam1- A pointer to the QuickDraw bitmap to print.
lParam2- A pointer to the rectangle you want to print.
lParam3- The type of resolution used to print the bitmap. The LaserWriter printer driver ignores this flag. This parameter can have one of the following values:
PrCtlCallprocedure with theiPrIOCtlcontrol constant when you want text streaming in your application. (Text streaming is useful for fast printing of text when speed is more important than visual fidelity or formatting. It makes no use of QuickDraw.) In this case, you should supply the parameters toPrCtlCallwith the following information:
You can use the
iWhichCtl- The constant
iPrIOCtl. This constant causes text streaming to occur.lParam1- A pointer to the beginning of the text.
lParam2- The number of bytes to transfer. The high-order word must be 0.
lParam3- This should be 0.
PrCtlCallprocedure with theiPrEvtCtlcontrol constant for printing the screen or the frontmost window on most ImageWriter printers. (The LaserWriter printer driver does not support this call.) In this case, you should supply the parameters toPrCtlCallwith the following information:
You can use the
iWhichCtl- The constant
iPrEvtCtl. This constant prints the object you have selected using thelParam1parameter.lParam1- This parameter selects the object to be printed. If this value is $00000000, you want to print the screen. If this value is $00010000, you want to print the frontmost window.
lParam2- This should be
NIL.lParam3- This should be
NIL.PrCtlCallprocedure with theiPrDevCtlcontrol constant for controlling the printer device. In this case, you should supply the parameters toPrCtlCallwith the following information:
iWhichCtl- The constant
iPrDevCtl.lParam1- The action you want to take. The values possible for this parameter are listed in Table 9-1.
lParam2- This should be
NIL.lParam3- This should be
NIL.SPECIAL CONSIDERATIONS
Apple strongly discourages you from using this routine.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for thePrCtlCallprocedure are
Trap macro Selector _PrGlue $A0000E00