Xref: utzoo comp.sys.mac:26099 comp.sys.mac.programmer:4273 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!ukma!tut.cis.ohio-state.edu!rutgers!att!pegasus!ech From: ech@pegasus.ATT.COM (Edward C Horvath) Newsgroups: comp.sys.mac,comp.sys.mac.programmer Subject: Re: CDEF problems Message-ID: <2561@pegasus.ATT.COM> Date: 2 Feb 89 18:20:44 GMT References: <3598@ucdavis.ucdavis.edu> Organization: AT&T ISL Middletown NJ USA Lines: 26 From article <3598@ucdavis.ucdavis.edu>, by lim@iris.ucdavis.edu (Lloyd Lim): [advising how to hilight a control] > ... Actually, these > days with color, instead of xoring stuff to invert, you have to switch the > foreground and background colors and redraw the thing you're inverting. There's a built-in flag to do this: see IM V-61. If you BitClr (Ptr (HiliteMode,pHiliteBit); or, in C, (*(char*)0x938) &= 0x7F; or, in assembler, bclr #7,$938 just before an InvertXXX operation, or drawing with srcXor mode, QD will swap the Hilite color (chosen in the Color cdev) and the background color. The degenerate case of one-bit-per-pixel works "exactly like inversion, and is compatible with all versions of Quickdraw." But QD resets the bit after each operation, so you have to continually clear it. My remaining question is why Apple didn't leave the bit CLEAR by default; seems to me that most apps would prefer the kinder, gentler effect obtained with hilitemode. (Despite it's colorful icons, I found that GunShy looks much better using hilitemode; simple inversion is rarely pleasing in color). =Ned Horvath=