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

# TCustomIcon.BitmapHandleAllocated

Indicates if a handle for the icon image has been allocated.

## Declaration

Source position: graphics.pp line 1666

`public function TCustomIcon.BitmapHandleAllocated: Boolean; override;`

## Function result

True when a valid handle has been assigned for the shared icon image.

## Description

BitmapHandleAllocated is an overridden Boolean function which indicates if a handle for the icon image has been allocated in the class instance. BitmapHandleAllocated implements the abstract virtual method defined in the ancestor class.

The return value is True when Current has a valid image index for the icon image, and the handle for the TIconImage in the shared icon has a non-zero value.

BitmapHandleAllocated is called from methods that required a valid image handle prior to performing actions using the image data. For example:

- Assign
- BitmapHandleNeeded
- MaskHandleNeed
- Draw
- EndUpdate
- SetMaskHandle

## See also

TRasterImage.BitmapHandleAllocated |  | BitmapHandleAllocated - returns True if a handle has been allocated for the Bitmap.