mirror of https://gitlab.com/basile.b/dexed.git
36 lines
694 B
Plaintext
36 lines
694 B
Plaintext
unit ce_sharedres;
|
|
|
|
interface
|
|
|
|
uses
|
|
Classes, Controls, Buttons, Graphics;
|
|
|
|
procedure AssignPng(ctrl: TPersistent; const resName: string);
|
|
|
|
implementation
|
|
|
|
var
|
|
png: TPortableNetworkGraphic;
|
|
|
|
procedure AssignPng(ctrl: TPersistent; const resName: string);
|
|
begin
|
|
try
|
|
png.LoadFromResourceName(HINSTANCE, resName);
|
|
if ctrl is TCustomBitBtn then
|
|
TCustomBitBtn(ctrl).Glyph.Assign(png)
|
|
else if ctrl is TCustomSpeedButton then
|
|
TCustomSpeedButton(ctrl).Glyph.Assign(png)
|
|
else if ctrl is TBitmap then
|
|
TBitmap(ctrl).Assign(png);
|
|
except
|
|
end;
|
|
end;
|
|
|
|
initialization
|
|
png := TPortableNetworkGraphic.Create;
|
|
//{$I ../src/ce_icons.inc}
|
|
finalization
|
|
png.Free;
|
|
end.
|
|
|