How to load resources in a FMX-component


I try to use resources in a FMX-Component and get the EResNotFound-Error when I try to read the resource.

following scenario:

a FMX-bpl (FmxComponents.bpl) where i added some png-files in my IDE (XE7) over ‘resources and images’.
the resources are into the ‘FmxComponents.dres’ but not in ‘FmxComponents.res’.
when I try to exceute this statement TResourceStream.Create(FindClassHInstance(TPmFmxTitelbar), ‘ImgOptions’, RT_RCDATA); I get the error EResNotFound ‘resource ImgOptions not found’
I tryed to solve it with the post from haole (how-to-add-and-use-a-resource-from-a-custom-package-component-in-delphi) but with no success.

Comments are closed.