home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.apple2
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!gatech!udel!sbcs.sunysb.edu!jsimmons
- From: jsimmons@cs.sunysb.edu (Jason Simmons)
- Subject: Re: How do I get the current location of a window?
- Message-ID: <1993Jan8.030931.28422@sbcs.sunysb.edu>
- Keywords: window position
- Sender: usenet@sbcs.sunysb.edu (Usenet poster)
- Nntp-Posting-Host: sblapis2
- Organization: State University of New York, Stony Brook
- References: <uerics.726388359@mcl>
- Date: Fri, 8 Jan 1993 03:09:31 GMT
- Lines: 18
-
- In article <uerics.726388359@mcl> uerics@mcl.ucsb.edu (Eric D. Shepherd)
- writes:
- >As far as I can tell, there is no way to get the current X,Y position of
- >the upper-right hand corner of the window. I want to be able to get that
- >position so that I can later feed it into MoveWindow (I'm writing a Finder
- >Extension, and want the window's position to be preserved between uses).
- >
- >Any suggestions?
-
- Set the current port to the window's port, call GetPortRect, and process
- the upper-left-hand point of the rectangle with LocalToGlobal. This
- point will now contain the global coordinates of the window's upper-left
- corner, which can later be used with MoveWindow.
-
- Check out the WinFlate source for an example of this.
-
- Jason Simmons
- jsimmons@sbcs.sunysb.edu
-