Vcl.ImgList.TCustomImageList.GetInstRes

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetInstRes(Instance: THandle; ResType: TResType; const Name: string;  Width: Integer; LoadFlags: TLoadResources; MaskColor: TColor): Boolean; overload;
function GetInstRes(Instance: THandle; ResType: TResType; ResID: DWORD;  Width: Integer; LoadFlags: TLoadResources; MaskColor: TColor): Boolean; overload;

C++

bool __fastcall GetInstRes(NativeUInt Instance, TResType ResType, const System::UnicodeString Name, int Width, TLoadResources LoadFlags, System::Uitypes::TColor MaskColor)/* overload */;
bool __fastcall GetInstRes(NativeUInt Instance, TResType ResType, unsigned ResID, int Width, TLoadResources LoadFlags, System::Uitypes::TColor MaskColor)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
Vcl.ImgList.pas
Vcl.ImgList.hpp
Vcl.ImgList TCustomImageList

Description

Loads a specified bitmap, cursor, or icon resource into the image list.

Use the GetInstRes method to load bitmap, cursor, or icon resource into an image list.

Instance is the instance handle of the resource module.

ResType indicates the type of resource (rtBitmap, rtCursor or rtIcon).

Name or ResID identifies the resource by name or ID, respectively.

Width specifies the width, in pixels, of the image.

LoadFlags specifies how to load the image.

MaskColor sets the transparent color for the image.

Note: GetInstRes must be used to load a resource from within a package. Within a package, GetResource or FileLoad returns an error.

See Also