home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / apple2 / 26554 < prev    next >
Encoding:
Text File  |  1993-01-07  |  1.2 KB  |  32 lines

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