|
-
April 28th, 1999, 02:18 AM
#1
Program not terminating on WM_ENDSESSION
Hi all,
my MFC program does not terminate when I logout from Windows NT 4.0. Instead I get a MessageBox from the operating system: "This Application does not respond to 'terminate task' " ("Diese Anwendung reagiert nicht auf die Anforderung 'Task beenden' ").
However I can stop it by starting another Program executing the following code:
HWND hwnd = (HWND)0xf0ab0230; // Window handle from Spy++
::PostMessage( hwnd, WM_QUERYENDSESSION, 0, ENDSESSION_LOGOFF );
::PostMessage( hwnd, WM_ENDSESSION, TRUE, ENDSESSION_LOGOFF );
The program does not use any special code to handle WM_QUERYENDSESSION and WM_ENDSESSION.
Does anyone have an idea, what might go wrong or what else I can do to debug this?
Thanks
Volker
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|