home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!decwrl!claris!wombat
- From: wombat@claris.com (Scott Lindsey)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Removing the menubar?
- Message-ID: <14822@claris.com>
- Date: 23 Jul 92 05:09:45 GMT
- References: <1992Jul21.201452.23920@nic.umass.edu> <kePQOia00WBM04mmoS@andrew.cmu.edu>
- Sender: news@claris.com
- Organization: Claris Corporation, Vancouver WA
- Lines: 30
- Nntp-Posting-Host: lindsey
- Wombat: yes
- Number: 37044
-
- In article <kePQOia00WBM04mmoS@andrew.cmu.edu>, sr0o+@andrew.cmu.edu (Steven Ritter) writes:
- >
- > int remove_menubar (RgnHandle gray_rgn) {
- > int old_height;
- > RgnHandle newgray_region;
- > Rect newgray_rect;
- >
- > old_height = GetMBarHeight();
- > SetMBarHeight(0); /*shrink menubar to 0*/
- >
- > newgray_region = NewRgn();
- > CopyRgn(GetGrayRgn(),gray_rgn);
- > SetRect(&newgray_rect,screenBits.bounds.left,screenBits.bounds.top,
- > screenBits.bounds.right,screenBits.bounds.bottom);
- > RectRgn(newgray_region,&newgray_rect);
- > CopyRgn(newgray_region,GetGrayRgn());
-
- Ack! no! Now you've just eliminated any other monitors besides your main
- monitor from the desktop!
-
- Try something like:
-
- SetRect(&newgray_rect, screenBits.bounds.left, screenBits.bounds.top,
- screenBits.bounds.right, old_height);
- RectRgn(newgray_region, &newgray_rect);
- UnionRgn(GrayRgn, newgray_region, GrayRgn);
-
- or so.
- --
- Scott Lindsey <wombat@claris.com>
-