Home » U++ Library support » U++ Widgets - General questions or Mixed problems » TrayIcon Windows Shutdown solution
TrayIcon Windows Shutdown solution [message #45124] |
Mon, 07 September 2015 13:35 |
Typhoor
Messages: 14 Registered: October 2012 Location: Erlangen, Germany
|
Promising Member |
|
|
Hi there,
I had problems with TrayIcon programs under Windows during Shutdown when I did not have a TopWindow.
Solution was to add WM_QUERYENDSESSION listerner to TaryIcons derived class WindowProc.
I had two solution either to subclass (a) or add to TrayIcon::WindowProc (b)
LRESULT TrayIconDerived::WindowProc( UINT message, WPARAM wParam, LPARAM lParam ) {
if ( message == WM_QUERYENDSESSION ) {
ShutDown();
return true;
}
return TrayIcon::WindowProc(message, wParam, lParam);
}
For both I needed to change repository code:
Could we either
a) have the TrayIcon::WindowProc make "protected" in header for subclassing or
b) add the handler to the TrayIcon::WindowProc itself?
Thanx for a thought!
Ralph
|
|
|
Goto Forum:
Current Time: Sun Dec 08 03:47:57 CET 2024
Total time taken to generate the page: 0.02682 seconds
|