FindClassHInstance(TPmFmxTitelbar)
Wo für das?
Also ich mach das so:
Delphi-Quellcode:
{$R CheckBox.res CheckBox.RC }
Procedure LoadGlobalBild(FImage:TImage;ResName:String);
var
RS : TResourceStream;
begin
FImage.MultiResBitmap.Clear;
if DDTGetScreenScale < 1.5
then begin
RS := TResourceStream.Create(HInstance,ResName+'1',RT_RCDATA);
FImage.MultiResBitmap.LoadItemFromStream(RS,1.0);
FreeAndNil(RS);
end
else begin
if DDTGetScreenScale < 2.0
then begin
RS := TResourceStream.Create(HInstance,ResName+'15',RT_RCDATA);
FImage.MultiResBitmap.LoadItemFromStream(RS,1.5);
FreeAndNil(RS);
end
else begin
RS := TResourceStream.Create(HInstance,ResName+'2',RT_RCDATA);
FImage.MultiResBitmap.LoadItemFromStream(RS,2.0);
FreeAndNil(RS);
end;
end;
end;
Und die Checkbox.RC sieht so aus:
Code:
Check1 RCDATA "ICONS\Checkklein.png"
Check15 RCDATA "ICONS\Checkmittel.png"
Check2 RCDATA "ICONS\Check.png"
UnCheck1 RCDATA "ICONS\Uncheckklein.png"
UnCheck15 RCDATA "ICONS\UncheckMittel.png"
UnCheck2 RCDATA "ICONS\Uncheck2.png"