Important: The information in this document is obsolete and should not be used for new development.
GetCIconYou can use
GetCIconto get a handle to a color icon of resource type
FUNCTION GetCIcon (iconID: Integer): CIconHandle;
- The resource ID for an icon of resource type
GetCIconfunction reads in the
'cicn'resource with the specified resource ID and returns a handle to it. The
GetCIconfunction searches the current resource chain for the resource. If
GetCIconfinds the resource, it reads the resource, creates a color icon record for the icon, and initializes the fields of the record according to the information contained in the
GetCIconreturns a handle to the color icon record as its function result. If
GetCIconcan't find the resource, it returns
NILas its function result.
To draw an icon obtained from
GetCIconin a specified rectangle, you can use either the
PlotCIconHandleallows you to specify transforms and alignments.
When you are finished with a handle obtained from
GetCIcon, use the
DisposeCIconprocedure to release the memory occupied by the color icon record.
noErr 0 No error resNotFound -192 Resource not found
SEE ALSOFor information about the color icon record, see "The Color Icon Record" on
page 5-17. For information about the format of the
'cicn'resource, see Inside Macintosh: Imaging with QuickDraw.
For descriptions of the
PlotCIconHandlefunction, see page 5-20 and page 5-26, respectively. The
DisposeCIconprocedure is described next.