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

# TCustomIcon.HandleNeeded

Ensures that a handle for the image has been allocated.

## Declaration

Source position: graphics.pp line 1634

`protected procedure TCustomIcon.HandleNeeded; override;`

## Description

HandleNeeded is an overridden procedure used to ensure that a handle for the image has been allocated. HandleNeeded re-implements the method defined in the ancestor class.

No actions are performed in the method when a valid valid has already been assigned to the shared image in the class instance.

HandleNeeded calls the CreateIconIndirect routine for the widgetset to get the value used as the Handle for the shared image.

## See also

TRasterImage.HandleNeeded |  | Ensures that a handle for the image is allocated in widgetset classes.