How can I use an Image I have loaded into ImageCache from a file with the setIconImage for the SystemTrayIconComponent?
The ImageCache is a Image* and the setIconImage requires Image
Can’t you just deference the pointer? I’m pretty sure that’s what I’ve done in the past with setIconImage().
I have tried but it does not work, it says it can’t convert from pointer to char.
Now I am not a very experienced developer so it could possibly be done, that I just don’t know how.
class HelloWorldContentComponent : public Component
{
SystemTrayIconComponent icon;
public:
HelloWorldContentComponent()
{
Image* iconImage = ImageCache::getFromFile(File(T("c:\\windows\\web\\bullet.gif")));
icon.setIconImage(*iconImage);
}
...
};
Works just fine for me.