Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
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 previous message
germax is currently offline  germax
Messages: 20
Registered: March 2017
Location: germany
Promising Member
Hi
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() {
        Icon(Tray::Icon1());
        PromptOK("TrayIcon launched this prompt!");
        Icon(Tray::Icon());
// 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.Separator();
        bar.Add("Exit", THISBACK(Break));
    }

    typedef App CLASSNAME;

    App() {
        Icon(Tray::Icon());
        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

Alex

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


[EDIT]

Hi,
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

 
Read Message icon6.gif
Read Message
Read Message
Previous Topic: CursorImage() not called
Next Topic: Bug: TopWindow::IsFullscreen is not working under GTK
Goto Forum:
  


Current Time: Sun May 26 08:24:26 CEST 2024

Total time taken to generate the page: 0.02088 seconds