From d4779e20c8cde5bbae51b8552a46e2392c57a8e6 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Fri, 8 Oct 2004 20:49:24 +0000 Subject: [PATCH] Bring up the File->Save dialog when receiving WM_QUERYENDSESSION. --- programs/notepad/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/programs/notepad/main.c b/programs/notepad/main.c index a783681bceb..327432d476f 100644 --- a/programs/notepad/main.c +++ b/programs/notepad/main.c @@ -149,6 +149,12 @@ static LRESULT WINAPI NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam, } break; + case WM_QUERYENDSESSION: + if (DoCloseFile()) { + return 1; + } + break; + case WM_DESTROY: PostQuitMessage(0); break;