Important: The information in this document is obsolete and should not be used for new development.
PrCtlCall
You can use thePrCtlCall
procedure 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
iWhichCtl
parameter. See the following paragraphs for this information.lParam2
- The use of this parameter varies according to the value in the
iWhichCtl
parameter. See the following paragraphs for this information.lParam3
- The use of this parameter varies according to the value in the
iWhichCtl
parameter. See the following paragraphs for this information.DESCRIPTION
ThePrCtlCall
procedure performs the operation indicated by theiWhichCtl
parameter. Depending on the operation,PrCtlCall
may also use information in thelParam1
,lParam2
, andlParam3
parameters. ThePrCtlCall
procedure calls the printer driver's control routine. Instead of sending the low-level calls to the printer driver, thePrCtlCall
procedure converts the call into its high-level equivalent before execution.You can use the
PrCtlCall
procedure with theiPrBitsCtl
control constant when you want to print bitmaps. In this case, you should supply the parameters toPrCtlCall
with 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:
PrCtlCall
procedure with theiPrIOCtl
control 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 toPrCtlCall
with 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.
PrCtlCall
procedure with theiPrEvtCtl
control 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 toPrCtlCall
with the following information:
You can use the
iWhichCtl
- The constant
iPrEvtCtl
. This constant prints the object you have selected using thelParam1
parameter.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
.PrCtlCall
procedure with theiPrDevCtl
control constant for controlling the printer device. In this case, you should supply the parameters toPrCtlCall
with 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 thePrCtlCall
procedure are
Trap macro Selector _PrGlue $A0000E00