mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-01-02 11:59:44 -06:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user