mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08: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:
@@ -7649,6 +7649,20 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
|||||||
EndMainDlg (hwndDlg);
|
EndMainDlg (hwndDlg);
|
||||||
return 1;
|
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:
|
default:
|
||||||
// Recreate tray icon if Explorer restarted
|
// Recreate tray icon if Explorer restarted
|
||||||
if (taskBarCreatedMsg != 0 && uMsg == taskBarCreatedMsg && TaskBarIconMutex != NULL)
|
if (taskBarCreatedMsg != 0 && uMsg == taskBarCreatedMsg && TaskBarIconMutex != NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user