
FB II Compiler
PG PRO
Debugging
Memory
System
Mathematics
Resources
Disk I/O
Windows
Controls
Menus
Mouse
Keyboard
Text
Fonts
Drawing
Sound
Clipboard
Printing
Communication
ASM
|
PRINTING
Save printer settings
What is PRHANDLE _really_? Specifically, what is it pointing at _before_ you've done a DEF PAGE or DEF PRINT? I'm storing a "prec" resource, per IM & HIG instructions, validating it, etc.; if there _isn't_ one, or it's invalid, and the user therefore does a page setup (DEF PAGE) then PRHANDLE is great. But if I _do_ use the stored page setup, until the DEF PRINT is actually done, I have to keep my own handle to the printer record. This makes 99% of the sample programs out there worthless, as they all use PRHANDLE. I also have to modify every PG routine to use my global handle instead. I guess the question is, is there a way to _set_ PRHANDLE to point to my saved print record?
PRHANDLE is merely a read-only global variable maintained by the FB runtime. Whenever FB feels like setting up a printer record, the contents of this handle gets updated. At program startup, this contains a default handle.
<< is there a way to _set_ PRHANDLE to point to my saved print record? >>
Not officially - but don't let that stop you!
LOCAL FN SETPRHANDLE(newHndl&)
` move.l D0, $F7C6(A5)
END FN
|