home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 12903 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  1.4 KB

  1. Path: sparky!uunet!decwrl!claris!wombat
  2. From: wombat@claris.com (Scott Lindsey)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Removing the menubar?
  5. Message-ID: <14822@claris.com>
  6. Date: 23 Jul 92 05:09:45 GMT
  7. References: <1992Jul21.201452.23920@nic.umass.edu> <kePQOia00WBM04mmoS@andrew.cmu.edu>
  8. Sender: news@claris.com
  9. Organization: Claris Corporation, Vancouver WA
  10. Lines: 30
  11. Nntp-Posting-Host: lindsey
  12. Wombat: yes
  13. Number: 37044
  14.  
  15. In article <kePQOia00WBM04mmoS@andrew.cmu.edu>, sr0o+@andrew.cmu.edu (Steven Ritter) writes:
  16. > int remove_menubar (RgnHandle gray_rgn) {
  17. > int old_height;
  18. > RgnHandle newgray_region;
  19. > Rect newgray_rect;
  20. >  
  21. >    old_height = GetMBarHeight();
  22. >    SetMBarHeight(0);  /*shrink menubar to 0*/
  23. >    newgray_region = NewRgn();
  24. >    CopyRgn(GetGrayRgn(),gray_rgn);
  25. >    SetRect(&newgray_rect,screenBits.bounds.left,screenBits.bounds.top,
  26. >            screenBits.bounds.right,screenBits.bounds.bottom);
  27. >    RectRgn(newgray_region,&newgray_rect);
  28. >    CopyRgn(newgray_region,GetGrayRgn());
  29.  
  30. Ack! no!  Now you've just eliminated any other monitors besides your main
  31. monitor from the desktop!
  32.  
  33. Try something like:
  34.  
  35.     SetRect(&newgray_rect, screenBits.bounds.left, screenBits.bounds.top,
  36.             screenBits.bounds.right, old_height);
  37.     RectRgn(newgray_region, &newgray_rect);
  38.     UnionRgn(GrayRgn, newgray_region, GrayRgn);
  39.  
  40. or so.
  41. --
  42. Scott Lindsey <wombat@claris.com>
  43.