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


AddIconToSuite

You can use the AddIconToSuite function to add icons to an icon suite. This function is most often used to read icons into an empty icon suite created with NewIconSuite.

FUNCTION AddIconToSuite (theIconData: Handle; theSuite: Handle;
                         theType: ResType): OSErr;
theIconData

A handle to the data for the new icon to be added to the icon suite. You can obtain a handle to icon data using various routines, such as GetIcon or GetResource.
theSuite
A handle to the icon suite to which to add the icon.
theType
The resource type of the new icon. The resource type should be that of an icon family member.
DESCRIPTION
The AddIconToSuite function adds the handle to the icon data to the specified icon suite at the location reserved for icon data of type theType. If the icon suite already includes a handle to icon data for that type, AddIconToSuite replaces the handle to the old data without disposing of it. In this case you may want to call GetIconFromSuite (described next) first to obtain the old handle so that you can dispose of it.

RESULT CODES
noErr0No error
paramErr-50No such type in icon family

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996