Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: Saving window position question Keywords: Window, MultiFinder Message-ID: <7889@hoptoad.uucp> Date: 7 Jul 89 18:36:47 GMT References: <505@suna.CMI.COM> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Distribution: usa Organization: Eclectic Software, San Francisco Lines: 19 In article <505@suna.CMI.COM> maryd@suna.CMI.COM (Mary Dimercurio) writes: >Hi! I am trying to make my application "MultiFinder friendly." Tech >note 158 suggests that I should save the positions of the windows that >I have open so that they will go where the user had them last when the >application is launched again. Unfortunately it doesn't say HOW I can >do this. How do I get the location of my windows to save (I plan to >save them in a resource)?? You can get the size just by looking at the portRect of the window. The position is almost as easy -- SetPort to the window and then do a LocalToGlobal on the point (0,0). These will require a bit more work if you have been doing SetOrigin calls, which is one of the many reasons I never use SetOrigin. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com Postal: 424 Tehama, SF CA 94103; Phone: (415) 495-2934 These are not my opinions, those of my ex-employers, my old schools, my relatives, my friends, or really any rational person whatsoever.