Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!van-bc!ubc-cs!fornax!mcdonald From: mcdonald@fornax.UUCP (Ken Mcdonald) Newsgroups: comp.sys.mac.programmer Subject: Changing ICONs on the fly in dialogs Message-ID: <391@fornax.UUCP> Date: 4 Mar 90 09:55:43 GMT Distribution: na Organization: School of Computing Science, SFU, Burnaby, B.C. Canada Lines: 17 I'm doing some fiddling with icons in dialogs, and need to be able to change them on the fly. This is easily accomplished with SetDItem, except that this procedure does not redraw the icon--hence the old, not the new icon, is left in the dialog box. I've tried to use PlotIcon to rectify this, but the icon came out in the wrong place, and also tried using InvalRect, to accumulate the rect to be drawn into the dialog's update region, which causes a crash. Inspection with the source-level debugger shows that thePort during the dialog's existence is the same as thePort right after I start my test shell, before the dialog is created. Is this supposed to happen? I'm not very much up on QuickDraw and the Window Manager, but I thought thePort would be set to the dialog's GrafPort when the dialog was created. Thanks for the help, Ken McDonald {mcdonald@cs.sfu.ca}