I am having a problem with wxTaskBarIcon - hopefully someone could enlighten me on the proper use. The following is for Win32 platform.
I create task bar icon, which pops up a menu with handler for "Exit" function. In handler for the "exit" item I call Close() on my main application frame.
In the main application frame OnClose handler I then Remove() task bar icon.
If I call Remove(), task bar icon is removed from tray but appears to continue running. As such, the application never exits even though the main frame is destroyed (task bar icon apparently keeps running the event loop).
If I attempt to delete task bar icon object from the OnClose() handler of main frame, I get exceptions in event handling for the task bar icon popup menu. It appears that popup menu is still active and sending events while the main frame is processing OnClose(). So, I can't delete the task bar icon either.
Task bar icon also does not seem to have Destroy() method so delayed destruction is not possible.
Any help in making my application be able to use the task bar icon and still exit would be appreciated!
Help with wxTaskBarIcon
Before reporting a bug, you should have tried longer... wxWidgets is certainly not perfect (what is?) but i do trust components, especially if they are used by thousand developers, and for a long time.
Maybe is it just a misunderstanding of the way components work. Someone else could have pointed it... if only you provided some source code.
Maybe is it just a misunderstanding of the way components work. Someone else could have pointed it... if only you provided some source code.
TrV wrote:Before reporting a bug, you should have tried longer... wxWidgets is certainly not perfect (what is?) but i do trust components, especially if they are used by thousand developers, and for a long time.
Maybe is it just a misunderstanding of the way components work. Someone else could have pointed it... if only you provided some source code.
Doing the same thing and expecting a different result. There is a saying about that, but I don't remember how that goes.
IMO if the sample crashes, then it's a bugTrV wrote:Before reporting a bug, you should have tried longer... wxWidgets is certainly not perfect (what is?) but i do trust components, especially if they are used by thousand developers, and for a long time.
Maybe is it just a misunderstanding of the way components work. Someone else could have pointed it... if only you provided some source code.