Important: The information in this document is obsolete and should not be used for new development.
GetIconFromSuite
You can use theGetIconFromSuitefunction to get an icon from an icon suite.
FUNCTION GetIconFromSuite (VAR theIconData: Handle; theSuite: Handle; theType: ResType): OSErr;
theIconData- GetIconFromSuite returns a handle to the data for the requested icon in this parameter. If an icon of the specified type does not exist in the given icon suite,
GetIconFromSuitereturnsNILin this parameter.theSuite- A handle to the icon suite from which to get the icon.
theType- The resource type of the desired icon.
DESCRIPTION
TheGetIconFromSuitefunction returns a handle to the data for the icon of typetheTypein the icon suite specified bytheSuite. If you intend to dispose of the handle, pass aNILhandle to theAddIconToSuitefunction to delete the corresponding entry in the suite.You can use the handle returned by
GetIconFromSuiteto manipulate the icon data, for example, to alter its color or add three-dimensional shading. However, you should not use the returned handle to draw the icon with other Icon Utilities routines.
- IMPORTANT
- To plot an icon from an icon suite, you should normally use
PlotIconSuite. ThePlotIconHandlefunction may not draw the icon correctly if you pass it the handle returned in thetheIconDataparameter ofGetIconFromSuite.![]()
RESULT CODES
noErr 0 No error paramErr -50 Requested type not present in suite SEE ALSO
For an example of the use of theGetIconFromSuitefunction, see Listing 5-4 on page 5-13.For a description of the
AddIconToSuitefunction, see page 5-33. ThePlotIconSuitefunction is described next.