From 6720803d4a08e45fb4c25179505526051659e565 Mon Sep 17 00:00:00 2001 From: kichik Date: Mon, 30 Apr 2007 17:18:45 +0000 Subject: [PATCH] disable the X button for InstallOptions pages as well when CancelEnabled is used git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5139 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/InstallOptions/InstallerOptions.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Contrib/InstallOptions/InstallerOptions.cpp b/Contrib/InstallOptions/InstallerOptions.cpp index bd6d1dfa..b4f42f7f 100644 --- a/Contrib/InstallOptions/InstallerOptions.cpp +++ b/Contrib/InstallOptions/InstallerOptions.cpp @@ -968,7 +968,14 @@ int WINAPI createCfgDlg() mySetWindowText(hBackButton,pszBackButtonText); if (bBackEnabled!=-1) EnableWindow(hBackButton,bBackEnabled); - if (bCancelEnabled!=-1) EnableWindow(hCancelButton,bCancelEnabled); + if (bCancelEnabled!=-1) + { + EnableWindow(hCancelButton,bCancelEnabled); + if (bCancelEnabled) + EnableMenuItem(GetSystemMenu(mainwnd, FALSE), SC_CLOSE, MF_BYCOMMAND | MF_ENABLED); + else + EnableMenuItem(GetSystemMenu(mainwnd, FALSE), SC_CLOSE, MF_BYCOMMAND | MF_GRAYED); + } if (bCancelShow!=-1) old_cancel_visible=ShowWindow(hCancelButton,bCancelShow?SW_SHOWNA:SW_HIDE); HFONT hFont = (HFONT)mySendMessage(mainwnd, WM_GETFONT, 0, 0);