home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / mac / programm / 18609 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.2 KB

  1. Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!agate!ucbvax!ucdavis!burrito.engr.ucdavis.edu!cklarson
  2. From: cklarson@burrito.engr.ucdavis.edu (Christopher Klaus Larson)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Hilite a Rect
  5. Keywords: color, hilite, novice
  6. Message-ID: <19386@ucdavis.ucdavis.edu>
  7. Date: 18 Nov 92 21:14:04 GMT
  8. References: <1e9v71INNgqn@agate.berkeley.edu>
  9. Sender: usenet@ucdavis.ucdavis.edu
  10. Organization: College of Engineering - University of California - Davis
  11. Lines: 24
  12.  
  13. In article <1e9v71INNgqn@agate.berkeley.edu> bfoley@obelisk.berkeley.edu (Brian Foley) writes:
  14. >
  15. >How do you hilite a rect using the current hilite color?
  16. >I am using InvertRect() now, but it would be "better" to do it
  17. >in color.  Inside Mac is rather vague on the subject I tried using 
  18. >
  19. >BitClr ((Ptr) HiliteMode, pHiliteBit);  /* IM V-61 */
  20. >
  21.  
  22. If you are using THINK C >= 5.0, the variable HiliteMode contains the 
  23. value of the hilite mode byte, not the addresss of the hilite mode byte.
  24. Try the following:
  25.  
  26.     *((char *)0x0938) &= 0x7F;
  27.  
  28.     or
  29.  
  30.     HiliteMode &= 0x7F; (THINK C only)
  31.  
  32. before your call to InvertRect(). That should do the trick. 0x0938 is the
  33. address of HiliteMode and 0x7F will mask off pHiliteBit.
  34.  
  35. --Chris
  36. cklarson@engr.ucdavis.edu
  37.