From 356aa4f4adea1d58c7e3ac6f62e4c1f292636825 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Fri, 5 Jun 2015 07:38:17 +0000 Subject: [PATCH] [SHELL32] show/hide some controls on disk drive properties based on drive type svn path=/trunk/; revision=68018 --- reactos/dll/win32/shell32/dialogs/drvdefext.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/shell32/dialogs/drvdefext.cpp b/reactos/dll/win32/shell32/dialogs/drvdefext.cpp index 4eed0bdeb66..7ac1c53ef62 100644 --- a/reactos/dll/win32/shell32/dialogs/drvdefext.cpp +++ b/reactos/dll/win32/shell32/dialogs/drvdefext.cpp @@ -308,9 +308,18 @@ CDrvDefExt::InitGeneralPage(HWND hwndDlg) default: IconId = IDI_SHELL_DRIVE; TypeStrId = IDS_DRIVE_FIXED; } - if (DriveType != DRIVE_FIXED) + if (DriveType == DRIVE_CDROM) + { + /* volume label textbox */ EnableWindow(GetDlgItem(hwndDlg, 14000), false); + + /* disk compression */ + ShowWindow(GetDlgItem(hwndDlg, 14011), false); + /* index */ + ShowWindow(GetDlgItem(hwndDlg, 14012), false); + } + HICON hIcon = (HICON)LoadImage(shell32_hInstance, MAKEINTRESOURCE(IconId), IMAGE_ICON, 32, 32, LR_SHARED); if (hIcon) SendDlgItemMessageW(hwndDlg, 14016, STM_SETICON, (WPARAM)hIcon, 0); @@ -367,6 +376,9 @@ CDrvDefExt::InitGeneralPage(HWND hwndDlg) GetDlgItemTextW(hwndDlg, 14009, wszFormat, _countof(wszFormat)); swprintf(wszBuf, wszFormat, m_wszDrive[0]); SetDlgItemTextW(hwndDlg, 14009, wszBuf); + + /* show disk cleanup button only for fixed drives */ + ShowWindow(GetDlgItem(hwndDlg, 14010), DriveType == DRIVE_FIXED); } INT_PTR CALLBACK