Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!apple!agate!ucbvax!bloom-beacon!eru!hagbard!sunic!mcsun!corton!imag!gourdol From: gourdol@imag.imag.fr (Gourdol Arnaud) Newsgroups: comp.sys.mac.programmer Subject: Re: writing to a window without selecting it. Message-ID: <20240@imag.imag.fr> Date: 9 Apr 91 10:45:37 GMT References: <1991Apr9.034248.6761@hub.cs.jmu.edu> Organization: IMAG Institute, University of Grenoble, France Lines: 25 In article <1991Apr9.034248.6761@hub.cs.jmu.edu> jmidili@hub.cs.jmu.edu (jeff midili) writes: >Lots of programs like MacDraw, MacDraft, etc have a small window >seperate of the main image window that displays the x,y coordinates >of the mouse pointer withen the image. I have written a program >that displays a pix image, and now I want to add the small window that >will display the x,y coordinates of the mouse when it is in the >window. I can do it now, but only by selecting the coordwindow during >each NULL event and drawstringing the coordinates in the coordwindow. >The problem with this is that for each NULL event I Select the coord- >window, draw in it, and then Select my image window. This creates >unsightly flickering in each window. Don't select the window, just switch the grafPorts: SetPort(coordWindow); DrawString(...); SetPort(mainWindow); Arno. -- /======================//==========================================/ / Arnaud Gourdol. // On the Netland: Gourdol@imag.fr / / // Via AppleLink: Gourdol@imag.fr@INTERNET# / /======================//==========================================/