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 » U++ Widgets - General questions or Mixed problems » TrayIcon Windows Shutdown solution
TrayIcon Windows Shutdown solution [message #45124] Mon, 07 September 2015 13:35 Go to next message
Typhoor is currently offline  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
Re: TrayIcon Windows Shutdown solution [message #45318 is a reply to message #45124] Thu, 29 October 2015 18:51 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Right on spot. Applied. Thanks.

[Updated on: Thu, 29 October 2015 18:51]

Report message to a moderator

icon7.gif  Re: TrayIcon Windows Shutdown solution [message #45327 is a reply to message #45318] Fri, 30 October 2015 12:26 Go to previous message
Typhoor is currently offline  Typhoor
Messages: 14
Registered: October 2012
Location: Erlangen, Germany
Promising Member
Thanx Mirek, works well...
Previous Topic: Bugs ColumnList
Next Topic: Parent continues before child is painted
Goto Forum:
  


Current Time: Thu Mar 28 20:11:19 CET 2024

Total time taken to generate the page: 0.01332 seconds