home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / programm / 15057 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.3 KB

  1. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!news.Brown.EDU!news.Brown.EDU!news
  2. From: Andrew Gilmartin <Andrew_Gilmartin@Brown.Edu>
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Q: GrayRgn + Menu bar region
  5. Date: 6 Sep 1992 20:38:06 GMT
  6. Organization: Brown University
  7. Lines: 23
  8. Distribution: world
  9. Message-ID: <18dq7eINN48i@stanley.cis.Brown.EDU>
  10. NNTP-Posting-Host: cis_staff-kntx12.cis.brown.edu
  11. X-UserAgent: Nuntius v1.1.1d7
  12. X-XXDate: Sun, 6 Sep 92 21:42:13 GMT
  13.  
  14. With WaitNextEvent() you can specify when to receive mouse
  15. moved messages by specifying a region within which you don't
  16. care about the mouse's movement but outside of which you do.
  17. When the mouse is outside of the front window, I only care to
  18. be notified when the mouse moves into the front window. This is
  19. simply done using a region that is the difference between the
  20. desktop and my window, for example
  21.  
  22.         RectRgn( theWindowRgn, &theWindowRect );
  23.         XorRgn( GetGrayRgn(), theWindowRgn, theCursorRgn );
  24.  
  25. The problem is that GetGrayRgn() excludes the menu bar and so I
  26. get mouse moved messages when the mouse moves there. Is there a
  27. clean way to get the full screen region (desktop and menu bar)?
  28. Thanks.
  29.  
  30. --
  31. Andrew Gilmartin
  32. Computing & Information Services
  33. Brown University
  34.  
  35. Andrew_Gilmartin@Brown.Edu
  36. (401) 863-7305
  37.