If I may suggest, as you are using BGRABitmap, you could use BGRAResource. This will retrieve the resource whether it is provided as RES file (LoadFromResourceName) or as LRS file (LoadFromLazarusResource).
That would be almost the same:
procedure TCustomBCButton.AssignFromResource(AResourceName: string);
var
AStream : TStream;
AButton : TBCButton;
begin
AButton := TBCButton.Create(nil);
try
AStream := BGRAResource.GetResourceStream(AResourceName);
ReadComponentFromTextStream(AStream, TComponent(AButton), OnFindClass);
Assign(AButton);
finally
AStream.Free;
AButton.Free;
end;
end;
And you can call it like that:
BCButton1.AssignFromResource('btnstyle'); //for RES Data resource
BCButton1.AssignFromResource('btnstyle.dat'); //for RES Data resource
BCButton1.AssignFromResource('btnstyle.comp'); //for LRS Resource with custom file extension