Hi. I’m trying to load a png resource into an Image. In the other frameworks I’ve worked with, the image class is usually capable of loading the image requiring only some kind of resource ID. Under VC8 I have a .rc file with
BACKGROUND PNG DISCARDABLE “…/…/rc/bg.png”
and in the component I want to do something like this:
void MyEditorComponent::paint (Graphics& g)
{
Image* img = ImageCache::getFromFile(File(T("BACKGROUND")));
g.drawImageAt(img, 0, 0);
}
Of course this doesn’t work, but I’m just trying to clarify what I want to do.
Thanks,
Adam