![]() |
RegisterIconRefFromResource |
||||
Header: | Icons.h | Carbon status: | Supported | |
Adds a resource-derived IconRef to the Icon Services registry.
OSErr RegisterIconRefFromResource ( OSType creator, OSType iconType, const FSSpec *resourceFile, SInt16 resourceID, IconRef *theIconRef );
The creator code of the icon data you wish to register. You can use your applications creator code, for example. Lower-case creator codes are reserved for the system.
The type code of the icon data you wish to register.
A pointer to the file system specification structure for the resource file from which to read the icon data.
The resource ID of the icon data to be registered. This value must be non-zero.
You should provide a resource of type 'icns' if possible. If an 'icns' resource is not available, Icon Services uses standard icon suite resources, such as 'ICN#', instead.
On return, a pointer to the desired icon data.
A result code.
You can use the RegisterIconRefFromResource function to register icons from 'icns' resources or classic custom icon resources ('ics#', 'ICN#', etc.). Icon Services searches 'icns' resources before searching other icon resources.
Calling this function increments the reference count of the IconRef.
Remember to call the function ReleaseIconRef when you're done with an IconRef.
Supported in Carbon. Available in CarbonLib 1.0 and later when IconServicesLib 8.5 or later is installed. Exported by CarbonLib 1.0 and later and by IconServicesLib 8.5 and later.
© 2000 Apple Computer, Inc. (Last Updated 4/18/2000)