https://git.reactos.org/?p=reactos.git;a=commitdiff;h=30e0c2430dfdfc3673aa6…
commit 30e0c2430dfdfc3673aa626fe32ff8fc27dc7352
Author: Jared Smudde <computerwhiz02(a)hotmail.com>
AuthorDate: Wed Nov 27 02:18:50 2019 -0600
Commit: Robert Naumann <gonzomdx(a)gmail.com>
CommitDate: Wed Nov 27 09:18:50 2019 +0100
[SHELL32] Disable all controls during format and re-enable after format is complete.
(#2098)
---
dll/win32/shell32/dialogs/drive.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/dll/win32/shell32/dialogs/drive.cpp b/dll/win32/shell32/dialogs/drive.cpp
index 674e81cb21b..60243d44a02 100644
--- a/dll/win32/shell32/dialogs/drive.cpp
+++ b/dll/win32/shell32/dialogs/drive.cpp
@@ -591,17 +591,27 @@ static unsigned __stdcall DoFormatDrive(void *args)
HWND hwndDlg = pParams->hwndDlg;
PFORMAT_DRIVE_CONTEXT pContext = pParams->pContext;
+ /* Disable controls during format */
HMENU hSysMenu = GetSystemMenu(hwndDlg, FALSE);
EnableMenuItem(hSysMenu, SC_CLOSE, MF_BYCOMMAND | MF_GRAYED);
EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDCANCEL), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, 28673), FALSE);
EnableWindow(GetDlgItem(hwndDlg, 28677), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, 28680), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, 28679), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, 28674), FALSE);
FormatDrive(hwndDlg, pContext);
+ /* Re-enable controls after format */
EnableWindow(GetDlgItem(hwndDlg, IDOK), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDCANCEL), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, 28673), TRUE);
EnableWindow(GetDlgItem(hwndDlg, 28677), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, 28680), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, 28679), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, 28674), TRUE);
EnableMenuItem(hSysMenu, SC_CLOSE, MF_BYCOMMAND | MF_ENABLED);
pContext->bFormattingNow = FALSE;