Home » U++ Library support » TopWindow&PopUp, TrayIcon » TrayIcon::Icon problems
TrayIcon::Icon problems [message #933] |
Thu, 09 February 2006 15:04  |
hojtsy
Messages: 241 Registered: January 2006 Location: Budapest, Hungary
|
Experienced Member |
|
|
I am trying to use runtime generated images for tray icon. I modified the TrayIcon reference example to try it:
struct App : TrayIcon {
void Info() {
//Icon(Tray::Icon1());
Image img(16, 16);
img.Set(White);
ImageDraw w(img);
w.DrawRect(0, 0, 8, 8, Black);
Icon(img);
PromptOK("TrayIcon launched this prompt!");
Icon(Tray::Icon());
}
void Menu(Bar& bar) {
bar.Add("Info..", THISBACK(Info));
bar.Separator();
bar.Add("Exit", THISBACK(Break));
}
typedef App CLASSNAME;
App() {
WhenBar = THISBACK(Menu);
WhenLeftDouble = THISBACK(Info);
Icon(Tray::Icon());
Tip("This is U++ tray icon");
}
}; The tray icon set from the generated Image is just empty, transparent. What is the problem?
|
|
|
Re: TrayIcon::Icon problems [message #942 is a reply to message #933] |
Thu, 09 February 2006 21:04   |
 |
mirek
Messages: 14256 Registered: November 2005
|
Ultimate Member |
|
|
Missing mask and ImageDraw not finished
void Info() {
Image img(16, 16);
img.Set(White);
{
ImageDraw w(img);
w.DrawRect(0, 0, 8, 8, Black);
ImageMaskDraw ww(img);
ww.DrawRect(0, 0, 16, 16, Black);
}
Icon(img);
Note that there will be huge changes (including the interface) in relatively near future of all Image related stuff...
Mirek
|
|
|
|
|
Goto Forum:
Current Time: Tue Apr 29 20:56:58 CEST 2025
Total time taken to generate the page: 0.04119 seconds
|