Important: The information in this document is obsolete and should not be used for new development.
GetIconYou can use the
GetIconfunction to get a handle to an icon resource of type
FUNCTION GetIcon (iconID: Integer): Handle;
- The resource ID for an icon of resource type
GetIconfunction reads in the
'ICON'resource with the specified resource ID and returns a handle to it. The
GetIconfunction searches the current resource chain for the resource. If
GetIconfinds the resource, it reads the resource and returns a handle to the icon as its function result. If
GetIconcan't find the resource, it returns
NILas its function result.
To draw an icon obtained from
GetIconin a specified rectangle, you can use either
PlotIconHandleallows you to specify transforms and alignments.
When you are finished using a handle obtained from
GetIcon, use the
ReleaseResourceprocedure to release the memory occupied by the icon resource data.
noErr 0 No error resNotFound -192 Resource not found
SEE ALSOFor a description of the
PlotIconHandlefunction, see page 5-23 and page 5-24, respectively. For information about
ReleaseResource, see the chapter "Resource Manager" in this book.