Path: utzoo!mnetor!uunet!munnari!moncskermit!moncsbruce!conybear From: conybear@moncsbruce.oz (Roland Conybeare) Newsgroups: comp.sys.mac Subject: Re: Lightspeed C question Message-ID: <340@moncsbruce.oz> Date: 14 Dec 87 03:48:23 GMT References: <13231@beta.UUCP> Organization: Comp Sci, Monash Uni, Australia Lines: 20 Keywords: printf, stdio, quickdraw, grafport Summary: SetPort(gp) back to the gp you want to draw in In article <13231@beta.UUCP>, wkp@beta.UUCP (Bill Peter) writes: > > ...when I open up a grafport to > use quickdraw routines, everything is fine. But then > using printf() causes the mac to write onto a new > screen (I assume stdio), and makes the program go nuts. > Since I need to use printf() to output both text and > floating point numbers, this is incovenient. I can't > use DrawString to output floating point numbers (or can I?)... I don't know what your Mac background knowledge is. It sounds like you need to get Inside Macintosh, from Apple or a bookstore (If you like looking at trees). From what you have said, I think your problem is that between a call to printf() in a stdio window and a call to quickdraw in your own grafport, you must call SetPort() since when printf() returns the stdout window is the current window. Roland Conybeare (conybear@moncsbruce.oz)