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

# CreateBitmapFromResourceName

Creates a TCustomBitmap instance with the content for the named Lazarus resource.

## Declaration

Source position: graphics.pp line 2002

`function CreateBitmapFromResourceName(`
`Instance: TLCLHandle;`
`const ResName: string`
`):TCustomBitmap;`

## Arguments

`Instance` |  | Handle for the Lazarus resource with the content for the bitmap.
`ResName` |  | Name for the RT_BITMAP resource loaded in the routine.

## Function result

Bitmap instance created and loaded in the routine.

## Description

Used in the implementation of components, and the LCL, to get a bitmap image stored in a Lazarus resource. Typically used to load button glyphs and icons displayed on the component palette in the Lazarus IDE.

## 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

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.