Status & Roadmap
Authors & License
Funding Ultimate++
Search on this site
Search in forums

SourceForge.net Logo
Home » U++ Library support » TopWindow&PopUp, TrayIcon » TrayIcon is driving me insane
icon6.gif  TrayIcon is driving me insane [message #47804] Sat, 01 April 2017 05:23 Go to next message
germax is currently offline  germax
Messages: 20
Registered: March 2017
Location: germany
Promising Member
I'm really going MAD with that fricking TrayIcon the last couple of days...

I have a TopWindow that gets hidden;
and that TrayIcon pops up no problem..

BUT no matter what I do, I cannot get that TrayIcon to bubble up an event back to show the TopWindow again.

I cannot pass my TopWindow as a reference to the Tray either to use that
(or say I'm too unexperienced in c++ to know how)

So please anyone,
please a simple Example on how to get my TopWindow back with a menu-click (or LeftDouble or whatever) would be very much appreciated.

Just assume some class MyAppThingy
calling the struct TrayIcon (as found in the -too shallow to be usefull- example Wink)
struct App : TrayIcon {
    virtual void LeftDouble() {
        PromptOK("TrayIcon launched this prompt!");
// I'd like to re-show TopWindow from here instead of just a useless Prompt.

    virtual void Menu(Bar& bar) {
        bar.Add("Info..", THISBACK(LeftDouble));
        bar.Add("Exit", THISBACK(Break));

    typedef App CLASSNAME;

    App() {
        Tip("This is U++ TrayIcon");

And I don't seem to get anywhere..
A simple IDOK is all I need really a way to reference the existing MyAppThingy Window
(passing it to "App" on creation or something)

I know that if you are (UNLIKE ME) someone with some c++ experience, this is just a no brainer most likely;
but your help is very much appreciated!

Thanks a ton


PS I don't have a codesample really.. since it doesn't work it's been removed in anger and rage Wink


fresh day, relaxed mind....
and I stumbled across the EyeCare example;
which frankly did exactly what I needed!

So I just copied that order of operation and now I'm a happy camper

See you in my next breakdown Laughing

that other german guy

[Updated on: Sat, 01 April 2017 16:05]

Report message to a moderator

Re: TrayIcon is driving me insane [message #47808 is a reply to message #47804] Sat, 01 April 2017 19:25 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1077
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello and welcome in our community Smile,

It is nice to hear that you solve the obstacle. In upp example/tutorials you can find useful code examples that covers the majority of upp framework. Even now for the moder u++, we modernized our tutorials to be compatibility with c++11/14.

And even if something is not available at the tutorial/examples, you could always just look to bazaar solutions.


U++ - one framework to rule them all.

[Updated on: Sat, 01 April 2017 19:26]

Report message to a moderator

Re: TrayIcon is driving me insane [message #47815 is a reply to message #47804] Sun, 02 April 2017 14:21 Go to previous message
germax is currently offline  germax
Messages: 20
Registered: March 2017
Location: germany
Promising Member
Thanks for the Welcome!

I wouldn't say I solved it (I just litterally stumbled upon a premade solution)

In most examples and tutorials the Code is stripped down to an absolute minimum for good reason;
the problem with that is, when it comes to a 'better' explanation it lacks detail.
Bazaar is great, if "by accident" you run across the correct package.
I mean EyeCare is just a perfect example.. HOW in the world should I know to look at that example when looking for a trayicon issue I have?
that question came up before (more or less) in the forum with no solution provided really.
And looking at all examples tutorials and bazaar entries is quite time consuming if one only needs a very short order of operation.

I know it's tedious and most of all boring as hell to create examples
and even worse to document the code.
And you all have my sympathy;
but that really needs to be improved IMHO.

So I'd like to suggest something to help "find" and maybe even reduce need for documentation

Here's my proposal:
How about all packages in the selector get another column to list all Ctrls used (like SQLCtrl, EditString, TrayIcon... etc).
that should be easy to do programmatically and wouldn't need any human interaction when adding the package.
The manual description lacks on some Bazaar entries and is not very telling on many other packages either...

that way next one looking for a TrayIcon example could filter the packagelist (example, bazaar, tutorials etc) for all that do contain a TrayIcon (or an SQLCtrl or what have you...)

Doesn't even have to be a visible column, just a suggestionbox on the package picker with all controls listed and just filtering the package list Wink

What do you think about that Wink


that other german guy
Previous Topic: CursorImage() not called
Next Topic: Bug: TopWindow::IsFullscreen is not working under GTK
Goto Forum:

Current Time: Sat Jun 22 16:58:45 CEST 2024

Total time taken to generate the page: 0.01736 seconds