I have a custom Delphi component created for Firemonkey (fmx). I now need to apply my custom style to the component. The style is saved in a resource. Previously this was done in the GetStyleObject method by calling TStyleManager.LoadFromResource.
This method (LoadFromResource) does not exist anymore in Delphi 10 Seattle for the Firemonkey framework.
My code in XE7 was working through the LoadFromResource:
function TFMXPic.GetStyleObject: TFmxObject;
var
style : string;
begin
if (StyleLookup = '') then
begin
style := GetClassStyleName;
Result := TControl(TStyleManager.LoadFromResource(HInstance,
style, RT_RCDATA));
Exit;
end;
Result := inherited GetStyleObject;
end;
How do I achieve this in Delphi 10 Seattle?