Important: The information in this document is obsolete and should not be used for new development.
GetIconFromSuite
You can use theGetIconFromSuite
function 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,
GetIconFromSuite
returnsNIL
in this parameter.theSuite
- A handle to the icon suite from which to get the icon.
theType
- The resource type of the desired icon.
DESCRIPTION
TheGetIconFromSuite
function returns a handle to the data for the icon of typetheType
in the icon suite specified bytheSuite
. If you intend to dispose of the handle, pass aNIL
handle to theAddIconToSuite
function to delete the corresponding entry in the suite.You can use the handle returned by
GetIconFromSuite
to 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
. ThePlotIconHandle
function may not draw the icon correctly if you pass it the handle returned in thetheIconData
parameter ofGetIconFromSuite
.RESULT CODES
noErr 0 No error paramErr -50 Requested type not present in suite SEE ALSO
For an example of the use of theGetIconFromSuite
function, see Listing 5-4 on page 5-13.For a description of the
AddIconToSuite
function, see page 5-33. ThePlotIconSuite
function is described next.