Skip to main content

TcxCustomImageList.ResInstLoad(THandle,TResType,string,TColor) Method

Loads a specific image from the specified resource module.

Declaration

function ResInstLoad(AInstance: THandle; AResType: TResType; const AName: string; AMaskColor: TColor): Boolean;

Parameters

Name Type Description
AInstance THandle

A handle to the resource module.

AResType TResType

The resource type.

AName string

The resource name.

AMaskColor TColor

The transparency mask color.

Returns

Type Description
Boolean

True if the function successfully loads and appends one or more images to the image list; otherwise, False.

Remarks

In addition to the specified bitmap, you can pass its transparency mask bitmap as the AMask parameter. If nil (in Delphi) or nullptr (in C++Builder) is passed as the AMask parameter, the AddBitmap function generates a transparency mask bitmap based on a color passed as the AMaskColor parameter.

Note

The transparency mask bitmap is ignored if the Masked property is set to False.

The ResourceLoad and FileLoad functions are designed to load images from individual resources. To load images from packaged resources, call the ResInstLoad, LoadImage, or GetInstRes function instead.

See Also