RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomImageList.GetResource Method

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

Pascal
function GetResource(ResType: TResType; const Name: string; Width: Integer; LoadFlags: TLoadResources; MaskColor: TColor): Boolean;
C++
__fastcall Boolean GetResource(TResType ResType, const AnsiString Name, int Width, TLoadResources LoadFlags, TColor MaskColor);

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

Note: Within a package, GetResource returns an error. GetInstRes must be used to load a resource from within a package.
ResType specifies the type of graphical resource that is to be loaded into the image list and can be rtBitmap, rtCursor or rtIcon.  

Name identifies the resource by name.  

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

LoadFlags specifies how to load the image. 

MaskColor sets the transparent color for the images in the file. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!