From 3a7d41e630118a7cb287a988e071f4ae8a802927 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Tue, 23 Aug 2011 20:03:55 +0100 Subject: [PATCH] Avoid closing the updater dialog when the window close button is clicked. This prevents the user closing the dialog whilst the update is in progress. Once the update has been installed, the user can click the 'Finish' button to close the dialog and restart the application. --- src/UpdateDialogWin32.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/UpdateDialogWin32.cpp b/src/UpdateDialogWin32.cpp index f89e17e..fb591bd 100644 --- a/src/UpdateDialogWin32.cpp +++ b/src/UpdateDialogWin32.cpp @@ -147,6 +147,12 @@ LRESULT WINAPI UpdateDialogWin32::windowProc(HWND window, UINT message, WPARAM w { switch (message) { + case WM_CLOSE: + if (window == m_window.GetHwnd()) + { + return 0; + } + break; case WM_COMMAND: { if (reinterpret_cast(lParam) == m_finishButton.GetHwnd())