[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Graphics' (#lcl)

# TIcon.LoadFromResourceHandle

Loads icon data from the specified instance and resource handles.

## Declaration

Source position: graphics.pp line 1689

`public procedure TIcon.LoadFromResourceHandle(`
`Instance: TLCLHandle;`
`ResHandle: TFPResourceHandle`
`); override;`

## Arguments

`Instance` |  | Handle with the resource data loaded in the method.
`ResHandle` |  | Resource handle with the icon data loaded in the method.

## Description

LoadFromResourceHandle is an overridden method in TIcon used to load image data from an icon resource identified by the handles in Instance and ResHandle. The handles are passed as arguments to the RTL LoadResource routine which provides the global handle for the group resource on the platform.

LoadFromResourceHandle reads the icon headers and data for the entries from the resource. The ReadData method is called to read and store the values in the stream to the shared raster image for the icon.

LoadFromResourceHandle reimplements the empty implementation introduced in the TCustomIcon ancestor.

## Version info

Modified in LCL version 4.0 to use the TLCLHandle type instead of the deprecated THandle type in the Instance parameter.

## See also

TCustomIcon.LoadFromResourceHandle |  | Loads icon data from the specified instance and resource handles.
TCustomIcon.ReadData |  | Reads data for the class instance from a stream.
TRasterImage.LoadFromStream |  | LoadFromStream - loads data for the image from a specified data stream, optionally supplying its size.
LCLType.TLCLHandle |  | Alias to the TLCLHandle type defined for widgetset references.
WSReferences.TLCLHandle |  | The type used for handles in LCL applications, components, controls, and widget set classes.