Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!amdahl!nsc!taux01!cyosta From: cyosta@taux01.UUCP (Yossie Silverman) Newsgroups: comp.sys.mac.programmer Subject: Re: How to change a printing port's portrect? Message-ID: <874@taux01.UUCP> Date: 28 Jul 88 14:37:24 GMT References: <873@taux01.UUCP> <9566@dartvax.Dartmouth.EDU> Reply-To: taux01!cyosta@nsc.UUCP (Yossie Silverman) Organization: National Semiconductor (Israel) Ltd. Lines: 29 In article <9566@dartvax.Dartmouth.EDU> earleh@eleazar.dartmouth.edu (Earle R. Horton) writes: > >What is in the Print Record whose Handle you pass to PrOpenDoc? You >shouldn't have to change this stuff, but rather should negotiate with >the Printing Manager to set up a Print Record first. Then when you >open the printing port you should get a portRect which corresponds to >the prInfo.rPage Rect in the Print Record. Are you calling >PrintDefault and/or the Printing Dialog routines before opening the >port? > Well, I am doing all that, i think. I am calling the page setup routine in response to the page setup menu item. I am calling the printer job routine in response to the print... command. I call the default routine as the first thing i do in the program to intialize the print record. And then I open the port and get the screenbits port. I also get the screenbits port when I start a new page. I am sorry I can't remember the names of the routines. Can you or someone post a skeleton print procedure(s) I.e. what to do when I start my program, what to do when the page setup is chosen, what to do when the print... is chosen and what to do at the end of the program (well, I don't do anything, but maybe that is wrong too). I also figured out that I should bracket all non-interruptible (by menu's etc..) procedures which deal with printing with PrOpen and PrClose so that a new resource file could be opened by chooser should the user desire to do so. The IM I use (phonebook) says that the calls should only be called at the begining and end of program. -- Yossie Silverman What did the Caspian sea? National Semiconductor Ltd. (Israel) - Saki UUCP: taux01!yossie@nsc.UUCP NSA LSD FBI KGB PCP CIA MOSAD NUCLEAR MI5 SPY ASSASSINATE SDI -- OOCLAY ITAY