home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!primerd.prime.com!usenet
- From: Jim Cook <J.Cook@ENS.Prime.COM>
- Subject: Re: Invalidating the Entire Screen?
- Message-ID: <1992Nov20.214447.27552@primerd.prime.com>
- Sender: usenet@primerd.prime.com (Usenet)
- Reply-To: <J.Cook@ENS.Prime.COM>
- Organization: Prime Computer, Inc.
- References: <1992Nov19.220447.11714@primerd.prime.com> <9211191547.aa28279@Paris.ics.uci.edu>
- Date: Fri, 20 Nov 1992 21:44:47 GMT
- Lines: 43
-
- In article <9211191547.aa28279@Paris.ics.uci.edu> kanderso@mabillon.ICS.UCI.EDU
- (Kenneth Anderson) writes:
- >In comp.sys.mac.programmer you write:
- >
- >>Is there an easy one call should do it all?
- >
- >Here is code that I saved, because it is the only code to date that
- >Ben Haller has posted to the net. I believe it does what
- >you need...
- >
- >>void InvalScreen()
- >>{
- >> DrawMenuBar();
- >> PaintOne(0L,GrayRgn);
- >> PaintBehind(WindowList,GrayRgn);
- >>}
- >
- >After posting this code, Ben stated:
- >
- >>I believe this is the only code I have ever posted that is copied
- >>directly from Solarian II, so all you people who have been slavering
- >>over the (imagined) prospect of getting Sol source out of my tight
- >>little fists, rejoice!
-
- This worked, though it took me a couple hours to debug (call me slow).
- The problem is that most people will probably execute this code and leave,
- therefore avoiding any problems.
-
- The problems one should be aware of are:
-
- 1. DrawMenuBar should not be called with anything in the menu bar hilited.
- IM Vol 1 warns about this.
-
- 2. Both PaintOne and PaintBehind muck with the current value of qd.thePort.
- Therefore, do a GetGWorld at the beginning of this call and a SetGWorld
- after each of the calls (well, you probably could just do one set at the
- end, but I was frustrated and ultimately played it safe).
-
- Thanks to all!
- The net comes thru again!
-
- Jim
-
-