Path: utzoo!news-server.csri.toronto.edu!rutgers!psuvax1!wuarchive!cs.utexas.edu!sun-barr!apple!Greg@AppleLink.Apple.Com From: Greg@AppleLink.Apple.Com (Greg Marriott) Newsgroups: comp.sys.mac.programmer Subject: Re: GetNamedResource and cicn Message-ID: <12442@goofy.Apple.COM> Date: 8 Mar 91 12:24:49 GMT References: <1991Mar06.143904.23891@tkk.tele.fi> Sender: usenet@Apple.COM Distribution: comp Organization: Apple Computer, Inc. Lines: 20 In article <1991Mar06.143904.23891@tkk.tele.fi>, jopa@tkk.tele.fi (Jorma Paananen TKK-tt) writes: > following code works for cicns, color or b&w. > > aCIconHandle = GetCIcon (iconID); > PlotCIcon (&aRect, aCIconHandle); > > but why doesn't this work (plots only garbage) when run in Mac with > color, when run in Mac with b&w screen, the b&w version of the cicn > plots ok. > > aCIconHandle = (CIconHandle) GetNamedResource ('cicn', iconNamePstr); > PlotCIcon (&aRect, aCIconHandle); GetCIcon does more than just getting the 'cicn' resource. It also fills out the color icon data structures in memory (putting the color table into a handle, etc...). Greg Marriott Blue Meanie Apple Computer, Inc.