Important: The information in this document is obsolete and should not be used for new development.
GetIconFromSuiteYou can use the
GetIconFromSuitefunction to get an icon from an icon suite.
FUNCTION GetIconFromSuite (VAR theIconData: Handle; theSuite: Handle; theType: ResType): OSErr;
- 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,
NILin this parameter.
- A handle to the icon suite from which to get the icon.
- The resource type of the desired icon.
GetIconFromSuitefunction returns a handle to the data for the icon of type
theTypein the icon suite specified by
theSuite. If you intend to dispose of the handle, pass a
NILhandle to the
AddIconToSuitefunction 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.
- To plot an icon from an icon suite, you should normally use
PlotIconHandlefunction may not draw the icon correctly if you pass it the handle returned in the
noErr 0 No error paramErr -50 Requested type not present in suite
SEE ALSOFor an example of the use of the
GetIconFromSuitefunction, see Listing 5-4 on page 5-13.
For a description of the
AddIconToSuitefunction, see page 5-33. The
PlotIconSuitefunction is described next.