|
|
Home » U++ Library support » TopWindow&PopUp, TrayIcon » trayicon and shutdown
trayicon and shutdown [message #5571] |
Wed, 04 October 2006 08:40  |
atmks
Messages: 33 Registered: July 2006
|
Member |
|
|
hi
i have small problem with trayicon example,
when trayicon (or eyecare) is running and i want shutdown
a computer, windows shows a window with message:
____________________________________
|End program - trayicon.exe
|------------------------------------
|
| progress bar
| ######################
|
| If you choose to end program.....
| ---------
| | End now |
| ---------
|____________________________________
and 2nd message in same window
This program not responding
how can i resolv this?
bye
atmks
[Updated on: Wed, 04 October 2006 08:41] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Re: trayicon and shutdown [message #5777 is a reply to message #5776] |
Sun, 15 October 2006 17:56   |
 |
mirek
Messages: 14255 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
|
|
|
|
|
Goto Forum:
Current Time: Fri Apr 25 17:49:46 CEST 2025
Total time taken to generate the page: 0.01022 seconds
|
|
|