Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!news.cs.indiana.edu!noose.ecn.purdue.edu!piccolo.ecn.purdue.edu!coxr From: coxr@piccolo.ecn.purdue.edu (Richard L Cox) Newsgroups: comp.sys.mac.programmer Subject: Basic Printing - Help Keywords: Print Message-ID: Date: 11 Jun 91 21:07:39 GMT Sender: root@noose.ecn.purdue.edu (ECN System Management) Organization: Purdue University Engineering Computer Network Lines: 73 Hello all, I am just beginning to develop and one thing which is very important to writing applications is printing. I have read The C Programming Primer and Inside and Can't make this simple call to the printer and use quickdraw commands. Here is what I have (using Think C 4.0.5) #include #include #include #include #define NIL 0L #define REMOVE_ALL_EVENTS 0 #define HORIZONTAL_PIXEL 10 #define VERTICAL_PIXEL 220 /******************* Main *******************/ int main() { ToolBoxInit(); PrintStuff(); } /************** Tool Box Init ***************/ ToolBoxInit() { InitGraf( &thePort ); InitFonts(); FlushEvents( everyEvent, REMOVE_ALL_EVENTS ); InitWindows(); InitMenus(); TEInit(); InitDialogs(NIL); InitCursor(); } /****************** WindowInit ****************/ PrintStuff() { TPPrPort myPrPort; THPrint prRecHdl; PrOpen(); PrintDefault(prRecHdl); myPrPort = PrOpenDoc( prRecHdl, NIL, NIL); PrOpenPage(myPrPort,NIL); /* QuickDraw Commands */ MoveTo( HORIZONTAL_PIXEL, VERTICAL_PIXEL ); TextFont( 14 ); TextFace( bold ); TextSize( 18 ); DrawString("\p Grateful Dead"); PrClosePage(myPrPort); PrCloseDoc(myPrPort); PrClose(); } aTdHvAaNnKcSe -Rich Internet: coxr@ecn.purdue.edu