procedure TSkin.LoadSkin(DXDevice: TDXDevice; AFilename: WideString);
var
dp:TD2D1_POINT_2U;
ar: TD2D1_RECT_U;
hr: HResult;
begin
if FDLLHandle <> 0
then
FreeLibrary(FDLLHandle);
FDLLHandle := LoadLibraryW(pWideChar(AFilename));
D2DFunctions.LoadBitmapFromResource(DXDevice, FDLLHandle, '
Button', 56, 56, FButton);
D2DFunctions.LoadBitmapFromResource(DXDevice, FDLLHandle, '
InnerLabel', 54, 55, FInnerLabel);
D2DFunctions.LoadBitmapFromResource(DXDevice, FDLLHandle, '
InnerLabelSelected', 54, 55, FInnerLabelSelected);
D2DFunctions.LoadBitmapFromResource(DXDevice, FDLLHandle, '
ButtonSelected', 56, 56, FButtonSelected);
D2DFunctions.LoadBitmapFromResource(DXDevice, FDLLHandle, '
Background', 1920, 1080, FBackground);
D2DFunctions.LoadBitmapFromResource(DXDevice, FDLLHandle, '
ImageButton', 56, 56, FImageButton);
D2DFunctions.LoadBitmapFromResource(DXDevice, FDLLHandle, '
ImageButtonSelected', 56, 56, FImageButtonSelected);
D2DFunctions.LoadBitmapFromResource(DXDevice, FDLLHandle, '
CheckboxChecked', 18, 18, FCheckBoxChecked);
D2DFunctions.LoadBitmapFromResource(DXDevice, FDLLHandle, '
CheckboxUnchecked', 18, 18, FCheckBoxUnChecked);
dp.x:=12;
dp.y:=2;
ar.left:=0;
ar.top:=0;
ar.right:=50;
ar.bottom:=50;
hr:=FButtonSelected.CopyFromBitmap(@
dp,FButton,@ar);
// hr:=FButtonSelected.CopyFromBitmap(dp,FButton,ar);
if hr=0
then OutputDebugString('
suuüa');
end;