Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!midway!zaphod!francis From: francis@uchicago.edu (Francis Stracke) Newsgroups: comp.sys.mac.programmer Subject: Re: Mouse Location Message-ID: Date: 1 Feb 91 14:51:28 GMT References: <0bdWARO00UhW04iF8J@andrew.cmu.edu> <1991Jan31.153307.7732@umiami.ir.miami.edu> Sender: news@midway.uchicago.edu (News Administrator) Organization: Mathematics Department, University of Chicago Lines: 24 In-Reply-To: gv9b2c9z@umiami.ir.miami.edu's message of 31 Jan 91 20:33:07 GMT In article <1991Jan31.153307.7732@umiami.ir.miami.edu> gv9b2c9z@umiami.ir.miami.edu (Ordinary Man) writes: In article <0bdWARO00UhW04iF8J@andrew.cmu.edu>, rg2c+@andrew.cmu.edu (Robert Nelson Gasch) writes: > Does anybody out there know how to access the location of a mouseclick? All you really have to do is call: Point mouseLoc; GetMouse(&mouseLoc); No, no! Whenever you get any event (evt), evt.where holds the location of the mouse at the time the event occurred. This is what you want: it is possible that the user may have moved the mouse since clicking (esp. if you're doing something slow). (It's also faster to read the value than to call a procedure. :-) -- /=============================================================================\ | Francis Stracke | My opinions are my own. I don't steal them.| | Department of Mathematics |=============================================| | University of Chicago | Until you stalk and overrun, | | francis@zaphod.uchicago.edu | you can't devour anyone. -- Hobbes | \=============================================================================/