On Fri, 24 Feb 2006 14:29:45 -0600, you wrote:
Author: Francois Gouget fgouget@codeweavers.com Date: Fri Feb 24 15:34:09 2006 +0100
user32: Handle WM_ENDSESSION in DefWinProc(). DefWinProc() should call PostQuitMessage() on WM_ENDSESSION if the shutdown is proceeding.
Hi Francois,
This patch is causing a problem in Pegasus Mail. Closing some dialogs cause termination of the complete program. Here is a part of SPY++ log when run under win2000, when I close the edit new mail dialog:
|<00202> 00130A82 S ..........................WM_SYSCOMMAND uCmdType:SC_CLOSE xPos:672 yPos:121 [wParam:0000F060 lParam:007902A0] |<00203> 00130A82 S ...........................WM_CLOSE wParam:00000000 lParam:00000000 |<00204> 00130A82 S ............................WM_QUERYENDSESSION nSource:1 (End Task from Task List dialog) [wParam:00000001 lParam:00000000] |<00951> 00130A82 R ............................WM_QUERYENDSESSION fShutdownIsOk:True [lResult:00000001] ... |<00952> 00130A82 S ............................WM_ENDSESSION fEndSession:True [wParam:00000001 lParam:00000000] |<00953> 00130A82 R ............................WM_ENDSESSION lResult:00000000
The WM_QUERYENDSESSION and WM_ENDSESSION are sent by the program:
|0009:Call user32.SendMessageA(00030024,00000011,00000001,00000000) ret=0040641d
How did you check the behavior of the Windows DefWindowProc? If I put a DefWindowProc(hwnd, WM_ENDSESSION, 1, 0); some where in a windows program nothing happens, while a PostQuitMesage certainly closes the app.
Rein.