Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!uwm.edu!ogicse!orstcs!mist.CS.ORST.EDU!boerned From: boerned@mist.CS.ORST.EDU (Dan Boerner) Newsgroups: comp.sys.mac.programmer Subject: Re: GetCIcon on a Mac + Keywords: GetCIcon, Plus, Color Quickdraw, error Message-ID: <1991Jun12.223358.3835@lynx.CS.ORST.EDU> Date: 12 Jun 91 22:33:58 GMT References: <1991Jun12.175142.12317@crash.cts.com> Sender: @lynx.CS.ORST.EDU Organization: Computer Science Department, Oregon State Univ. Lines: 37 Nntp-Posting-Host: mist.cs.orst.edu erich@crash.cts.com (Eric Hicks) writes: "Does anyone know exactly what happens if one tries to call a color QuickDraw" "function (e.g. GetCIcon) from a non CQD machine? (e.g. a Mac Plus)" Last time I tried this it resulted in the big LaBomba. The GetCIcon is an Unimplemented Trap on non Color QD machines like the Mac Plus. I'm fairly sure that although some color QD features have been added to System 7.0 (like fake GWorlds), this trap is still unavailable on non Color QD machines. To avoid the problem you should check for the availability of Color QD before you make the GetCIcon call. You can do this with Gestalt (described in IM-VI) or SysEnvirons (described in IM-V) if Gestalt is unavailable. The trick is to check first, then call GetIcon instead. Try something like this: gHasColorQD is set during initialization... if gHasColorQD then aCIconHandle := GetCicn(iconRsrcID) else anIconHandle := GetIcon(iconRsrcID); then later when you're ready to draw... if gHasColorQD then PlotCIcon(theRect,aCIconHandle) else PlotIcon(theRect,anIconHandle); then when you're done.. if gHasColorQD then DisposeCIcon(aCIconHandle); --Dan Boerner Oregon State University