U++ framework
Do not panic. Ask here before giving up.

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: 14291
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: Mon Jun 22 08:40:46 GMT+2 2026

Total time taken to generate the page: 0.01020 seconds