Path: utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!udel!rochester!pt.cs.cmu.edu!henry!hairston From: hairston@henry.ece.cmu.edu (David Hairston) Newsgroups: comp.sys.mac.programmer Subject: Re: How to highlight icons in modal dialogs? Message-ID: Date: 29 Nov 90 18:56:55 GMT References: <2174.2753935b@iccgcc.decnet.ab.com> Organization: Gaia II Lines: 23 In-reply-to: milikich@iccgcc.decnet.ab.com's message of 28 Nov 90 15:37:15 GMT [milikich@iccgcc.decnet.ab.com (Mike Milikich, Allen-Bradley Company) writes:] [] I am trying to highlight one of a pair of icons in a modal dialog, just [] like chooser does for selecting the serial port for Imagewriter [] configuration. First, it seems like I will have to re-paint the selected [] icon after every call to ModalDialog, since it redraws the whole thing. [] Is this true? Secondly, what is the best way to do the highlighting? [] A call to InvertRect doesn't seem to work consistently. Does anyone have [] advice or sample code they can share? If this is too elementary a problem, [] you can reply to me directly. Thanks... if the icon is a dialog item of your modal dialog then you'll need to keep track of its "inverse" state (i.e. re/set a flag to indicate when you've inverted the icon and remember to clear the flag when the modal dialog updates since it redraws a fresh window). you might also consider reserving space on the modal dialog with icon- sized userItems and then doing the appropriate drawing yourself. hope this helps some ... -dave- hairston@henry.ece.cmu.edu