1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 02:58:02 -06:00

Windows: Disable Set Key Header Algorithm item in "Volumes" menu when the system partition is selected by the user using "Select Device"

This commit is contained in:
Mounir IDRASSI
2015-07-08 18:18:43 +02:00
parent 0ddd19d4ab
commit b809cf62ae

View File

@@ -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)