1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-12 03:18:26 -06:00

Windows: use the correct window handle for creating message boxes. This became important after the introduction of the wait dialog in order to avoid having message boxes behind the wait dialog.

This commit is contained in:
Mounir IDRASSI
2014-12-27 11:18:58 +01:00
parent 2dbbd6b9d2
commit a8112b8373
30 changed files with 793 additions and 785 deletions

View File

@@ -231,7 +231,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
else
{
Error("CANNOT_DISPLAY_LICENSE");
Error("CANNOT_DISPLAY_LICENSE", hwndDlg);
exit (1);
}
@@ -904,14 +904,14 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (nCurrentOS == WIN_2000)
{
WarningDirect (L"Warning: Please note that this may be the last version of VeraCrypt that supports Windows 2000. If you want to be able to upgrade to future versions of VeraCrypt (which is highly recommended), you will need to upgrade to Windows XP or a later version of Windows.\n\nNote: Microsoft stopped issuing security updates for Windows 2000 to the general public on 7/13/2010 (the last non-security update for Windows 2000 was issued to the general public in 2005).");
WarningDirect (L"Warning: Please note that this may be the last version of VeraCrypt that supports Windows 2000. If you want to be able to upgrade to future versions of VeraCrypt (which is highly recommended), you will need to upgrade to Windows XP or a later version of Windows.\n\nNote: Microsoft stopped issuing security updates for Windows 2000 to the general public on 7/13/2010 (the last non-security update for Windows 2000 was issued to the general public in 2005).", hwndDlg);
HKEY hkey;
if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Updates\\Windows 2000\\SP5\\Update Rollup 1", 0, KEY_READ, &hkey) != ERROR_SUCCESS)
{
ErrorDirect (L"VeraCrypt requires Update Rollup 1 for Windows 2000 SP4 to be installed.\n\nFor more information, see http://support.microsoft.com/kb/891861");
ErrorDirect (L"VeraCrypt requires Update Rollup 1 for Windows 2000 SP4 to be installed.\n\nFor more information, see http://support.microsoft.com/kb/891861", hwndDlg);
AbortProcessSilent ();
}
@@ -923,10 +923,10 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
if (IsButtonChecked (GetDlgItem (hCurPage, IDC_WIZARD_MODE_EXTRACT_ONLY)))
{
Info ("TRAVELER_LIMITATIONS_NOTE");
Info ("TRAVELER_LIMITATIONS_NOTE", hwndDlg);
if (IsUacSupported()
&& AskWarnYesNo ("TRAVELER_UAC_NOTE") == IDNO)
&& AskWarnYesNo ("TRAVELER_UAC_NOTE", hwndDlg) == IDNO)
{
return 1;
}
@@ -1114,7 +1114,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
RefreshUIGFX ();
Info ("EXTRACTION_FINISHED_INFO");
Info ("EXTRACTION_FINISHED_INFO", hwndDlg);
SetWindowTextW (GetDlgItem (hwndDlg, IDC_NEXT), GetString ("FINALIZE"));
@@ -1146,7 +1146,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
RefreshUIGFX();
Error ("EXTRACTION_FAILED");
Error ("EXTRACTION_FAILED", hwndDlg);
return 1;
@@ -1157,7 +1157,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (bInProgress)
{
NormalCursor();
if (AskNoYes("CONFIRM_EXIT_UNIVERSAL") == IDNO)
if (AskNoYes("CONFIRM_EXIT_UNIVERSAL", hwndDlg) == IDNO)
{
return 1;
}
@@ -1171,7 +1171,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
else
{
if (bPromptReleaseNotes
&& AskYesNo ("AFTER_UPGRADE_RELEASE_NOTES") == IDYES)
&& AskYesNo ("AFTER_UPGRADE_RELEASE_NOTES", hwndDlg) == IDYES)
{
Applink ("releasenotes", TRUE, "");
}
@@ -1179,7 +1179,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
bPromptReleaseNotes = FALSE;
if (bPromptTutorial
&& AskYesNo ("AFTER_INSTALL_TUTORIAL") == IDYES)
&& AskYesNo ("AFTER_INSTALL_TUTORIAL", hwndDlg) == IDYES)
{
Applink ("beginnerstutorial", TRUE, "");
}
@@ -1188,7 +1188,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
if (bRestartRequired
&& AskYesNo (bUpgrade ? "UPGRADE_OK_REBOOT_REQUIRED" : "CONFIRM_RESTART") == IDYES)
&& AskYesNo (bUpgrade ? "UPGRADE_OK_REBOOT_REQUIRED" : "CONFIRM_RESTART", hwndDlg) == IDYES)
{
RestartComputer();
}