From f15052e68d43bdad8d8a125a3601ff8cedcf5a3d Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 8 Sep 2023 09:38:51 +0200 Subject: Windows: Add link in keyfiles dialog to documentation page for risks of third-party file extensions usage. --- src/Common/Dlgcode.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/Common/Dlgcode.c') diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index 2c9b3599..3dd508fa 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -6800,6 +6800,8 @@ BOOL CALLBACK KeyfileGeneratorDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LP SetWindowText(GetDlgItem (hwndDlg, IDC_KEYFILES_SIZE), L"64"); // set the maximum length of the keyfile base name to (TC_MAX_PATH - 1) SendMessage (GetDlgItem (hwndDlg, IDC_KEYFILES_BASE_NAME), EM_SETLIMITTEXT, (WPARAM) (TC_MAX_PATH - 1), 0); + + ToHyperlink (hwndDlg, IDC_LINK_KEYFILES_EXTENSIONS_WARNING); return 1; } @@ -6887,6 +6889,12 @@ BOOL CALLBACK KeyfileGeneratorDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LP EnableWindow(GetDlgItem (hwndDlg, IDC_KEYFILES_SIZE_UNIT), !GetCheckBox (hwndDlg, IDC_KEYFILES_RANDOM_SIZE)); } + if (lw == IDC_LINK_KEYFILES_EXTENSIONS_WARNING) + { + Applink ("keyfilesextensions"); + return 1; + } + if (lw == IDC_GENERATE_AND_SAVE_KEYFILE) { wchar_t szNumber[16] = {0}; @@ -10957,6 +10965,10 @@ void Applink (const char *dest) { StringCbCopyW (page, sizeof (page),L"Keyfiles.html"); } + else if (strcmp(dest, "keyfilesextensions") == 0) + { + StringCbCopyW (page, sizeof (page),L"Avoid%20Third-Party%20File%20Extensions.html"); + } else if (strcmp(dest, "introcontainer") == 0) { StringCbCopyW (page, sizeof (page),L"Creating%20New%20Volumes.html"); -- cgit v1.2.3