Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!ncar!midway!dwal From: dwal@midway.uchicago.edu (David Walton) Newsgroups: comp.sys.mac.programmer Subject: Re: dialogs with ModalDialog() Message-ID: <1990Jul28.044733.9609@midway.uchicago.edu> Date: 28 Jul 90 04:47:33 GMT References: <37353@shemp.CS.UCLA.EDU> Distribution: usa Organization: U. Chicago Computing Organizations, Academic and Public Comp. Lines: 42 In article <37353@shemp.CS.UCLA.EDU> trajmar@oahu.cs.ucla.edu (Peter Trajmar) writes: > >I have two questions about dialogs (using ModalDialog()). I can answer the first, but not the second. >1) How can I dim a static text item? I know I can make it a control >such as a check box and then do it. The problem is I don't want the >check box part to be drawn. Covering this with a user item does not >work very well since you can briefly see the box when ModalDialog() >redraws. I could also make a custom control but that seems like more >trouble than it's worth. You don't need to make it a control permanently; you can get an itemhandle to the item and then coerce that handle to a controlhandle to set the controlhilite. I don't have IM in front of me, but here's my best recollection of a code fragment: GetDItem(myDialog, myItem, myType, myItemHandle, myItemRect); SetCtlHilite(controlhandle(myItemHandle), 255); Again, these calls may be wrong in order of parameters, spelling, etc., but they should give you the general idea. Using type coercion means you don't actually have to change the item's type. There may also be more approved ways of dimming the text, as well. >I would appreciate any pointers you can give me. @thePort (and it comes free with every Macintosh application :-). >Peter Trajmar >(trajmar@cs.ucla.edu) P.S. I just noticed you were using C, not pascal; the fragment above (obviously) is in Pascal. -- David Walton Internet: dwal@midway.uchicago.edu University of Chicago { Any opinions found herein are mine, not } Computing Organizations { those of my employers (or anybody else). }