Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 5 - Icon Utilities / Icon Utilities Reference
Icon Utilities Routines


Creating an Icon Suite

You typically create an icon suite by reading all resources from a specific icon family into memory and storing handles to the icon resource data in a new icon suite. You can do this using the GetIconSuite function. Alternatively, you can create an empty icon suite using the NewIconSuite function and then add icons to it one at a time using the AddIconToSuite function.

Although you typically create an icon suite using GetIconSuite (which fills the suite with handles to icon resource data), you can also create an icon suite and then add handles to icon data. The handles that you add to the suite do not have to be associated with a resource fork. For example, your application might get icon data from the desktop database rather than reading it from a resource, or your application might read icon data from a resource and then detach it. In either case, you can provide a handle to the icon data and use AddIconToSuite to add the handle to the icon suite. You need to release the memory occupied by the icon suite when you're finished using it. The DisposeIconSuite function releases this memory but does not release the memory
of any resource handles. You can request DisposeIconSuite to release the memory of any other handles to icon data in the suite.

Note
When you create an icon suite from icon family resources, the associated resource file should remain open while you use Icon Utilities routines.

Subtopics
GetIconSuite
NewIconSuite
AddIconToSuite

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996