ImageEn, unit iexBitmaps

TIEBitmap.LoadFromResource

TIEBitmap.LoadFromResource


Declaration


procedure LoadFromResource(Instance: THandle; const ResName: string; ResType: PChar; Format: integer = 0); overload;
procedure LoadFromResource(Instance: THandle; const ResID: Integer; ResType: PChar; Format: integer = 0); overload;


Description


Load an image from a resource.

Parameter Description
Instance The instance handle associated with the executable or shared library that contains the resource (e.g. HInstance for the current application)
ResName/ResID The name or ID associated with resource
ResType The type of the resource as defined when it was created, e.g. RT_BITMAP for a bitmap resource, or RT_RCDATA for raw data
Format If this is 0 then the image format will be detected by reading its content, otherwise specify a type such as ioJPEG



Example


// Load the About Box image from a JPEG resource in the current application
MainForm1.ImageEnView1.IEBitmap.LoadFromResource( HInstance, 'AboutImage', RT_RCDATA, ioJPEG );

// Load the About Box image from a bitmap resource in the current application
MainForm1.ImageEnView1.IEBitmap.LoadFromResource( HInstance, 'AboutImage', RT_BITMAP, ioBMP );

Copies current bitmap to
Dest, using the SourceMask referred to the source.