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

LoadGlyphFromResourceName

Loads a bitmap from a named resource into the specified Glyph.

Declaration

Source position: buttons.pp line 521

procedure LoadGlyphFromResourceName(

  AGlyph: TButtonGlyph;

  Instance: THandle;

  const AName: string

);

Arguments

AGlyph

  

Button glyph updated in the routine.

Instance

  

Handle for the resource.

AName

  

Resource name loaded in the routine.

Description

LoadGlyphFromResourceName is a procedure used to load a bitmap into the specified Glyph from a named resource. AGlyph is the TButtonGlyph where the bitmap is stored. Instance is a THandle for the resource instance accessed in the routine. AName contains the name for the resource loaded in the routine.

LoadGlyphFromResourceName calls CreateBitmapFromResourceName to retrieve a TCustomBitmap using the specified handle and resource name. The bitmap is assigned to the TButtonGlyph in AGlyph. When AName is an empty string (''), the Glyph image in AGlyph is set to Nil.

LoadGlyphFromResourceName is used in the implementation of the LoadGlyphFromResourceName method in both TCustomBitBtn and TCustomSpeedButton.

See also

TCustomBitBtn.LoadGlyphFromResourceName

  

Loads the Glyph image with the specified named from a resource instance.

TCustomSpeedButton.LoadGlyphFromResourceName

  

Loads the image for the Glyph with the specified name from a resource instance.

TButtonGlyph

  

Represents an image that can be attached to a button.

CreateBitmapFromResourceName


Version 3.2 Generated 2024-02-25 Home