From f155b10a746a08532b83c3e7fc78e054e3559059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Sch=C3=BCmann?= Date: Mon, 21 Jul 2014 00:46:53 +0000 Subject: Plugin Updater: ! fixed dialog destruction @robyer, EndDialog is only to be used with DialogBox*() and not CreateDialog*() we use here... that's why WM_DESTROY "was" needed. git-svn-id: http://svn.miranda-ng.org/main/trunk@9894 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/PluginUpdater/src/DlgUpdate.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index c7f02157ce..9d97a09dd6 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -51,7 +51,7 @@ static void ApplyUpdates(void *param) // 1) If we need to escalate priviledges, launch a stub if (!PrepareEscalation()) { - EndDialog(hDlg, 0); + DestroyWindow(hDlg); return; } @@ -137,8 +137,7 @@ static void ApplyUpdates(void *param) // 5) Prepare Restart int rc = MessageBox(hDlg, TranslateT("Update complete. Press Yes to restart Miranda now or No to postpone a restart until the exit."), TranslateT("Plugin Updater"), MB_YESNO | MB_ICONQUESTION); - EndDialog(hDlg, 0); - PostMessage(hDlg, WM_DESTROY, 0, 0); // why do we have to call this manually? + DestroyWindow(hDlg); if (rc == IDYES) CallFunctionAsync(RestartMe, 0); } -- cgit v1.2.3