TcxCustomImageList.GetInstRes(THandle,TResType,string,Integer,TLoadResources,TColor) Method
Loads a specific image from the specified resource module.
Declaration
function GetInstRes(AInstance: THandle; AResType: TResType; const AName: string; AWidth: Integer; ALoadFlags: TLoadResources; AMaskColor: TColor): Boolean; overload;
Parameters
Name | Type | Description |
---|---|---|
AInstance | THandle | A handle to the resource module. |
AResType | TResType | The resource type. |
AName | string | The resource name. |
AWidth | Integer | The width of new images, in pixels. |
ALoadFlags | TLoadResources | Stores image load settings. |
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
The AMaskColor parameter specifies the color used to generate a transparency mask bitmap for the loaded image. Note that the image’s transparency mask bitmap is ignored if the Masked property is set to False.
If 0 is passed as the AWidth parameter, the GetInstRes function uses the Width property value as the resulting image width; otherwise, the AWidth parameter and Width property values match.
Note
The GetInstRes, LoadImage, and ResInstLoad functions are designed to load images from packaged resources. To load an image from an individual resource file, call the ResourceLoad or FileLoad function instead.