Minimize an application as a system tray icon


#1

Hi everybody ! Hi Jules and thanks for the 8 releases of Juce I have missed :lol: :lol: :lol: (always so fast !!!)

I have a question : is it possible to minimize an application as a system tray icon with Juce ?

Thanks !!!

PS. Juce is and stays my prefered library for doing everything in C++, for audio or not applications :smiley:


#2

Welcome back - yes, there’s a TaskbarIconComponent class in there somewhere for that kind of thing.


#3

Thank you very much ! That’s great ! :smiley:


#4

And while I’m here… Is it possible to add a “message” on the system tray icon ? (like when you deconnect something of the computer, with a cross to close the message…)


#5

I haven’t done any support for that, but you could just use a component for it.


#6

Yes you’re right :wink: I had forgotten it is possible to add some components outside the window…

And thanks again !


#7

Another question… I want to use the system tray icon to control the state of the main window. But I’m not able to access to its properties. I have tried to use the findParentComponentOfClass but that doesn’t work, I got a null pointer. I have added the TaskbarIcon component to the desktop…

Some ideas ? Thanks :wink:


#8

[quote=“Wolfen”]Another question… I want to use the system tray icon to control the state of the main window. But I’m not able to access to its properties. I have tried to use the findParentComponentOfClass but that doesn’t work, I got a null pointer. I have added the TaskbarIcon component to the desktop…

Some ideas ? Thanks :wink:[/quote]

…erm, why not just pass your tray icon a pointer to the main window when it’s created…?


#9

Why I have not thought about it myself before asking :oops: (erm… maybe because I don’t search enough ?)

I promise, I won’t ask stupid questions anymore :stuck_out_tongue:

And to change… Thanks ! :lol: (that works)


#10