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 and shutdown
Re: trayicon and shutdown [message #5777 is a reply to message #5776] Sun, 15 October 2006 17:56 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13976
Registered: November 2005
Ultimate Member
atmks wrote on Sun, 15 October 2006 10:00

Quote:


Please, be more specific. Error or that window about application not closing when shutting down Windows?




hi
sorry, i mean a window about application not closing

bye
atmks




OK, another try:

void Ctrl::ExitWin32()
{
	sFinished = true;
	for(int i = 0; i < Windows().GetCount(); i++) {
		HWND hwnd = Windows().GetKey(i);
		if(hwnd)
			::DestroyWindow(hwnd);
	}
	MSG msg;
	while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
		if(msg.message != WM_QUIT)
			::PostQuitMessage(0);
#ifndef flagDLL
#ifndef PLATFORM_WINCE
	OverwatchEndSession.Set();
	PostMessage(OverwatchHWND, WM_USER, 0, 0);
	LLOG("Waiting for overwatch thread to finish...");
	WaitForSingleObject(OverwatchThread, INFINITE);
	LLOG("...overwatch thread finished");
#endif
#endif
}


Seems to work OK for me now, but unfortunately, the problem is too erratic to judge anything... (otoh, the bug in the code seems to be quite obvious and inline with behaviour).

Please check it ASAP.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: StateH(OPEN) call missing in Linux
Next Topic: Problem with SetTimeCallback in TrayIcon
Goto Forum:
  


Current Time: Sun May 12 01:50:52 CEST 2024

Total time taken to generate the page: 0.01762 seconds