VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount/Mount.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-07-08 18:18:43 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-07-08 22:16:01 +0200
commitb809cf62aed2f91ef87c58525053558b29f06ff4 (patch)
tree6bf53df5022f69ffd252249bab841eb3c1e77553 /src/Mount/Mount.c
parent0ddd19d4ab96b69ec236fd04173a1a919cb5b7d1 (diff)
downloadVeraCrypt-b809cf62aed2f91ef87c58525053558b29f06ff4.tar.gz
VeraCrypt-b809cf62aed2f91ef87c58525053558b29f06ff4.zip
Windows: Disable Set Key Header Algorithm item in "Volumes" menu when the system partition is selected by the user using "Select Device"
Diffstat (limited to 'src/Mount/Mount.c')
-rw-r--r--src/Mount/Mount.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index a345e189..cfe3003b 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -7649,6 +7649,20 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
EndMainDlg (hwndDlg);
return 1;
+ case WM_INITMENUPOPUP:
+ {
+ // disable "Set Header Key Derivation Algorithm" entry in "Volumes" menu
+ // "Volumes" menu is the first (index 0) submenu of the main menu
+ if ((HMENU) wParam == GetSubMenu (GetMenu (hwndDlg), 0))
+ {
+ if (ActiveSysEncDeviceSelected ())
+ EnableMenuItem (GetMenu (hwndDlg), IDM_CHANGE_HEADER_KEY_DERIV_ALGO, MF_GRAYED);
+ else
+ EnableMenuItem (GetMenu (hwndDlg), IDM_CHANGE_HEADER_KEY_DERIV_ALGO, MF_ENABLED);
+ }
+ }
+ return 1;
+
default:
// Recreate tray icon if Explorer restarted
if (taskBarCreatedMsg != 0 && uMsg == taskBarCreatedMsg && TaskBarIconMutex != NULL)