home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!news.Brown.EDU!news.Brown.EDU!news
- From: Andrew Gilmartin <Andrew_Gilmartin@Brown.Edu>
- Newsgroups: comp.sys.mac.programmer
- Subject: Q: GrayRgn + Menu bar region
- Date: 6 Sep 1992 20:38:06 GMT
- Organization: Brown University
- Lines: 23
- Distribution: world
- Message-ID: <18dq7eINN48i@stanley.cis.Brown.EDU>
- NNTP-Posting-Host: cis_staff-kntx12.cis.brown.edu
- X-UserAgent: Nuntius v1.1.1d7
- X-XXDate: Sun, 6 Sep 92 21:42:13 GMT
-
- With WaitNextEvent() you can specify when to receive mouse
- moved messages by specifying a region within which you don't
- care about the mouse's movement but outside of which you do.
- When the mouse is outside of the front window, I only care to
- be notified when the mouse moves into the front window. This is
- simply done using a region that is the difference between the
- desktop and my window, for example
-
- RectRgn( theWindowRgn, &theWindowRect );
- XorRgn( GetGrayRgn(), theWindowRgn, theCursorRgn );
-
- The problem is that GetGrayRgn() excludes the menu bar and so I
- get mouse moved messages when the mouse moves there. Is there a
- clean way to get the full screen region (desktop and menu bar)?
- Thanks.
-
- --
- Andrew Gilmartin
- Computing & Information Services
- Brown University
-
- Andrew_Gilmartin@Brown.Edu
- (401) 863-7305
-