Path: utzoo!attcan!uunet!midway!ncar!mailrus!uflorida!mephisto!prism!cc100aa From: cc100aa@prism.gatech.EDU (Ray Spalding) Newsgroups: comp.sys.mac.programmer Subject: Re: Highlighting Message-ID: <14202@hydra.gatech.EDU> Date: 27 Sep 90 21:31:14 GMT References: <10290.2701c468@amherst.bitnet> Organization: Georgia Institute of Technology Lines: 24 In article <10290.2701c468@amherst.bitnet> djvelleman@amherst.bitnet writes: > Is there a routine I can call to highlight a region on the screen the way >TextEdit does--using the user-selected highlighting color on a Mac II, and >inverting black and white on other Macs? I do the following (MPW 2.0.1 C): #define hiliteMode 0x938 #define pHiliteBit 0 HiliteRgn(h) RgnHandle h; { if ((*h)->rgnBBox.right - (*h)->rgnBBox.left > 1) BitClr((Ptr)hiliteMode,pHiliteBit); InvertRgn(h); } -- Ray Spalding, Technical Services, Office of Information Technology Georgia Institute of Technology, Atlanta Georgia, 30332-0275 uucp: ...!{allegra,amd,hplabs,ut-ngp}!gatech!prism!cc100aa Internet: cc100aa@prism.gatech.edu