diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2023-09-24 01:26:02 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2023-09-24 01:26:02 +0200 |
commit | 76c64d49ea96719bf1a5d185053619001b0aa533 (patch) | |
tree | dfb0d7b9d3f6ad21e6886a2b2ec1b6aab85288d9 /src/Setup | |
parent | 07c827c84979560fbc8eace567ac5a7f9ac3a279 (diff) | |
download | VeraCrypt-76c64d49ea96719bf1a5d185053619001b0aa533.tar.gz VeraCrypt-76c64d49ea96719bf1a5d185053619001b0aa533.zip |
Windows: Add tooltip message and help button for new option to disable memory protection
Also a dedicated page in the documentation was added for it.
Diffstat (limited to 'src/Setup')
-rw-r--r-- | src/Setup/Setup.rc | 5 | ||||
-rw-r--r-- | src/Setup/Wizard.c | 26 |
2 files changed, 29 insertions, 2 deletions
diff --git a/src/Setup/Setup.rc b/src/Setup/Setup.rc index 7b31fc0f..2ab818d5 100644 --- a/src/Setup/Setup.rc +++ b/src/Setup/Setup.rc @@ -151,8 +151,9 @@ BEGIN CONTROL "Add VeraCrypt icon to &desktop",IDC_DESKTOP_ICON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,92,168,11 CONTROL "Associate the .hc file &extension with VeraCrypt",IDC_FILE_TYPE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,104,232,11 - CONTROL "Disable memory protection in VeraCrypt",IDC_DISABLE_MEMORY_PROTECTION, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,115,218,10 + CONTROL "Disable memory protection for Accessibility tools compatibility",IDC_DISABLE_MEMORY_PROTECTION, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,115,315,10 + PUSHBUTTON "?",IDC_DISABLE_MEMORY_PROTECTION_HELP,337,111,7,14 CONTROL "Create System &Restore point",IDC_SYSTEM_RESTORE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,125,194,11 LTEXT "Please select or type the location where you want to install the VeraCrypt program files. If the specified folder does not exist, it will be automatically created.",IDT_INSTALL_DESTINATION,11,14,319,25 END diff --git a/src/Setup/Wizard.c b/src/Setup/Wizard.c index 857eb2de..66e24571 100644 --- a/src/Setup/Wizard.c +++ b/src/Setup/Wizard.c @@ -212,6 +212,7 @@ static int GetDonVal (int minVal, int maxVal) BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { static char PageDebugId[128]; + static HWND hDisableMemProtectionTooltipWnd = NULL; WORD lw = LOWORD (wParam); WORD hw = HIWORD (wParam); @@ -439,9 +440,16 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa EnableWindow (GetDlgItem (hwndDlg, IDC_SYSTEM_RESTORE), FALSE); } + hDisableMemProtectionTooltipWnd = CreateToolTip (IDC_DISABLE_MEMORY_PROTECTION, hwndDlg, "DISABLE_MEMORY_PROTECTION_WARNING"); + // make IDC_DISABLE_MEMORY_PROTECTION control fit the text so that the tooltip is shown only when mouse is over the text + AccommodateCheckBoxTextWidth(hwndDlg, IDC_DISABLE_MEMORY_PROTECTION); + // make the help button adjacent to the checkbox + MakeControlsContiguous(hwndDlg, IDC_DISABLE_MEMORY_PROTECTION, IDC_DISABLE_MEMORY_PROTECTION_HELP); + SetCheckBox (hwndDlg, IDC_ALL_USERS, bForAllUsers); SetCheckBox (hwndDlg, IDC_FILE_TYPE, bRegisterFileExt); SetCheckBox (hwndDlg, IDC_PROG_GROUP, bAddToStartMenu); + SetCheckBox (hwndDlg, IDC_DISABLE_MEMORY_PROTECTION, bDisableMemoryProtection); SetCheckBox (hwndDlg, IDC_DESKTOP_ICON, bDesktopIcon); SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString (bUpgrade ? "UPGRADE" : "INSTALL")); @@ -687,6 +695,14 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa case IDC_DISABLE_MEMORY_PROTECTION: bDisableMemoryProtection = IsButtonChecked (GetDlgItem (hCurPage, IDC_DISABLE_MEMORY_PROTECTION)); + if (bDisableMemoryProtection) + { + Warning ("DISABLE_MEMORY_PROTECTION_WARNING", hwndDlg); + } + return 1; + + case IDC_DISABLE_MEMORY_PROTECTION_HELP: + Applink("memoryprotection") return 1; case IDC_FILE_TYPE: @@ -764,6 +780,16 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa } return 0; + case WM_DESTROY: + + if (hDisableMemProtectionTooltipWnd != NULL) + { + DestroyWindow (hDisableMemProtectionTooltipWnd); + hDisableMemProtectionTooltipWnd = NULL; + } + + break; + } return 0; |