Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!UCONNVM.BITNET!STEIN From: STEIN@UCONNVM.BITNET (Alan Stein) Newsgroups: comp.sys.apple2 Subject: Now I have a Print Manager Problem Message-ID: <9102200319.AA09758@apple.com> Date: 20 Feb 91 03:18:58 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 58 I'm making my first attempt to print using the Print Manager and am, as usual, running into problems. The relevant code I am using is below, with indications of the parts that are giving problems. I'd appreciate someone with experience using Print Manager either sending a short example of successful use of Print Manager, or taking a quick look at my code below and pointing out my errors. Also, am I correct in my understanding that one no longer needs to include support for choosing a printer directly in an application? /* Global Declarations */ word MyID; PrRecHndl printRecordHandle; GrafPortPtr printGrafPortPtr; PrStatusRecPtr statusRecPtr; /**************************************************************** * * FilePrint * ****************************************************************/ static void FilePrint () { PrJobDialog (printRecordHandle); printGrafPortPtr = PrOpenDoc (printRecordHandle,0L); PrOpenPage (printGrafPortPtr, 0L); /* print here -- no problems yet */ PrClosePage (printGrafPortPtr); PrCloseDoc (printGrafPortPtr); PrPicFile (printRecordHandle,0L,0L); } /* FilePrint */ /**************************************************************** * * FilePageSetup * ****************************************************************/ static void FilePageSetup () { if (!(printRecordHandle)) { /* This is the first place where the program fails to compile. I get a "Type Conflict" message at the end of the next line, but I can't see how my usage differs from the Toolbox Reference */ printRecordHandle = NewHandle (140L,MyID,0x8010,0x0000L); PrDefault (printRecordHandle); } PrStlDialog (printRecordHandle); } /* FilePageSetup */ /* main program */ startdesk (640); /* I bomb after quitting if I include the following statement */ MyID = GetNewID();