home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!agate!ucbvax!ucdavis!burrito.engr.ucdavis.edu!cklarson
- From: cklarson@burrito.engr.ucdavis.edu (Christopher Klaus Larson)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Hilite a Rect
- Keywords: color, hilite, novice
- Message-ID: <19386@ucdavis.ucdavis.edu>
- Date: 18 Nov 92 21:14:04 GMT
- References: <1e9v71INNgqn@agate.berkeley.edu>
- Sender: usenet@ucdavis.ucdavis.edu
- Organization: College of Engineering - University of California - Davis
- Lines: 24
-
- In article <1e9v71INNgqn@agate.berkeley.edu> bfoley@obelisk.berkeley.edu (Brian Foley) writes:
- >
- >How do you hilite a rect using the current hilite color?
- >I am using InvertRect() now, but it would be "better" to do it
- >in color. Inside Mac is rather vague on the subject I tried using
- >
- >BitClr ((Ptr) HiliteMode, pHiliteBit); /* IM V-61 */
- >
-
- If you are using THINK C >= 5.0, the variable HiliteMode contains the
- value of the hilite mode byte, not the addresss of the hilite mode byte.
- Try the following:
-
- *((char *)0x0938) &= 0x7F;
-
- or
-
- HiliteMode &= 0x7F; (THINK C only)
-
- before your call to InvertRect(). That should do the trick. 0x0938 is the
- address of HiliteMode and 0x7F will mask off pHiliteBit.
-
- --Chris
- cklarson@engr.ucdavis.edu
-