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

# TLoadIconFunction

Specifies a function called to load a named icon from a resource with the specified handle.

## Declaration

Source position: interfacebase.pp line 222

`type TLoadIconFunction = function(`
`hInstance: TLCLHandle;`
`lpIconName: PChar`
`):HICON;`

## Arguments

`hInstance` |  | Handle for the resource where the icon is located.
`lpIconName` |  | PChar value which points to the resource name or identifier for the icon loaded in the routine.

## Function result

Handle for the icon created and loaded in the routine.

## Description

TLoadIconFunction is the type used to implement the LoadIconFunction procedure variable. An example implementation is provided in the LocalLoadIcon function found in the implementation for the graphics.pp unit.

## Version info

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

## See also

LoadIconFunction |  | Variable with the function called to load an icon from a specified file or resource and return its handle.
TIcon.LoadFromResourceHandle |  | Loads icon data from the specified instance and resource handles.
TLCLHandle |  | The type used for handles in LCL applications, components, controls, and widget set classes.