VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-05-27 00:12:46 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-05-27 01:01:53 +0200
commit70215e3682345243301d410fc0072f294006403c (patch)
treea36ac199a658370a549a1fec7b1d413ff62f1ad7 /src/Common
parent8ebf5ac605d57eab80b600a7827d2ba48668d887 (diff)
downloadVeraCrypt-70215e3682345243301d410fc0072f294006403c.tar.gz
VeraCrypt-70215e3682345243301d410fc0072f294006403c.zip
Windows: GUI modifications around PIN field
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Common.rc17
-rw-r--r--src/Common/Dlgcode.c18
-rw-r--r--src/Common/Dlgcode.h1
-rw-r--r--src/Common/Language.xml4
-rw-r--r--src/Common/Resource.h5
5 files changed, 37 insertions, 8 deletions
diff --git a/src/Common/Common.rc b/src/Common/Common.rc
index 1fba8899..d296e7b0 100644
--- a/src/Common/Common.rc
+++ b/src/Common/Common.rc
@@ -65,7 +65,7 @@ BEGIN
PUSHBUTTON "Cancel",IDCANCEL,248,190,50,14
END
-IDD_MOUNT_OPTIONS DIALOGEX 0, 0, 277, 204
+IDD_MOUNT_OPTIONS DIALOGEX 0, 0, 277, 224
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "VeraCrypt - Mount Options"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -78,18 +78,21 @@ BEGIN
CONTROL "&Protect hidden volume against damage caused by writing to outer volume",IDC_PROTECT_HIDDEN_VOL,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,86,252,10
EDITTEXT IDC_PASSWORD_PROT_HIDVOL,112,104,151,14,ES_PASSWORD | ES_AUTOHSCROLL
- CONTROL "&Display password",IDC_SHOW_PASSWORD_MO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,146,90,10
- CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE_HIDVOL_PROT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,159,90,10
- PUSHBUTTON "&Keyfiles...",IDC_KEYFILES_HIDVOL_PROT,203,148,60,14
- LTEXT "What is hidden volume protection?",IDC_LINK_HIDVOL_PROTECTION_INFO,16,174,247,10,SS_NOTIFY
+ CONTROL "&Display password",IDC_SHOW_PASSWORD_MO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,165,90,10
+ CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE_HIDVOL_PROT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,178,90,10
+ PUSHBUTTON "&Keyfiles...",IDC_KEYFILES_HIDVOL_PROT,203,167,60,14
+ LTEXT "What is hidden volume protection?",IDC_LINK_HIDVOL_PROTECTION_INFO,16,193,247,10,SS_NOTIFY
DEFPUSHBUTTON "OK",IDOK,211,7,60,14
PUSHBUTTON "Cancel",IDCANCEL,211,24,60,14
RTEXT "P&assword to hidden volume:\n(if empty, cache is used)",IDT_HIDDEN_PROT_PASSWD,15,103,91,17,0,WS_EX_RIGHT
- GROUPBOX "Hidden Volume Protection",IDT_HIDDEN_VOL_PROTECTION,6,72,265,120
+ GROUPBOX "Hidden Volume Protection",IDT_HIDDEN_VOL_PROTECTION,6,72,265,139
CONTROL "Use backup header embedded in &volume if available",IDC_USE_EMBEDDED_HEADER_BAK,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,39,257,11
COMBOBOX IDC_PKCS5_PRF_ID,112,125,91,90,CBS_DROPDOWNLIST | WS_TABSTOP
RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,15,126,91,17
+ EDITTEXT IDC_PIN,112,145,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
+ RTEXT "Volume PIN:",IDT_PIN,15,148,91,17
+ LTEXT "(Empty or 0 for default iterations)",IDC_PIN_HELP,158,148,112,8
END
IDD_KEYFILES DIALOGEX 0, 0, 345, 237
@@ -348,7 +351,7 @@ BEGIN
BEGIN
LEFTMARGIN, 7
TOPMARGIN, 7
- BOTTOMMARGIN, 198
+ BOTTOMMARGIN, 218
END
IDD_KEYFILES, DIALOG
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index 5cf6dbaf..c9d01290 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -984,6 +984,11 @@ BOOL CALLBACK AboutDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam
// Version
SendMessage (GetDlgItem (hwndDlg, IDT_ABOUT_VERSION), WM_SETFONT, (WPARAM) hUserBoldFont, 0);
StringCbPrintfA (szTmp, sizeof(szTmp), "VeraCrypt %s", VERSION_STRING);
+#ifdef _WIN64
+ StringCbCatA (szTmp, sizeof(szTmp), " (64-bit)");
+#else
+ StringCbCatA (szTmp, sizeof(szTmp), " (32-bit)");
+#endif
#if (defined(_DEBUG) || defined(DEBUG))
StringCbCatA (szTmp, sizeof(szTmp), " (debug)");
#endif
@@ -10716,3 +10721,16 @@ int GetPin (HWND hwndDlg, UINT ctrlId)
}
return pin;
}
+
+void SetPin (HWND hwndDlg, UINT ctrlId, int pin)
+{
+ if (pin > 0)
+ {
+ char szTmp[MAX_PIN + 1];
+ StringCbPrintfA (szTmp, sizeof(szTmp), "%d", pin);
+ SetDlgItemText (hwndDlg, ctrlId, szTmp);
+ }
+ else
+ SetDlgItemText (hwndDlg, ctrlId, "");
+}
+
diff --git a/src/Common/Dlgcode.h b/src/Common/Dlgcode.h
index 1fd12d40..7dee2db5 100644
--- a/src/Common/Dlgcode.h
+++ b/src/Common/Dlgcode.h
@@ -481,6 +481,7 @@ BOOL IsWindowsIsoBurnerAvailable ();
BOOL LaunchWindowsIsoBurner (HWND hwnd, const char *isoPath);
BOOL IsApplicationInstalled (const char *appName);
int GetPin (HWND hwndDlg, UINT ctrlId);
+void SetPin (HWND hwndDlg, UINT ctrlId, int pin);
#ifdef __cplusplus
}
diff --git a/src/Common/Language.xml b/src/Common/Language.xml
index 9ae289d9..e1cdcde7 100644
--- a/src/Common/Language.xml
+++ b/src/Common/Language.xml
@@ -86,6 +86,8 @@
<control lang="en" key="IDT_PARTIAL_POOL_CONTENTS">Current pool content (partial)</control>
<control lang="en" key="IDT_PASS">Pass</control>
<control lang="en" key="IDT_PASSWORD">Password:</control>
+ <control lang="en" key="IDT_PIN">Volume PIN:</control>
+ <control lang="en" key="IDT_OLD_PIN">Volume PIN:</control>
<control lang="en" key="IDT_PROGRESS">Progress:</control>
<control lang="en" key="IDT_RANDOM_POOL">Random Pool: </control>
<control lang="en" key="IDT_SINGLE_BOOT">Select this option if there is only one operating system installed on this computer (even if it has multiple users).</control>
@@ -143,6 +145,8 @@
<control lang="en" key="IDC_MOUNT_OPTIONS">Mount Opti&amp;ons...</control>
<control lang="en" key="IDC_MOUNT_READONLY">Mount volume as read-&amp;only</control>
<control lang="en" key="IDC_NEW_KEYFILES">Keyfiles...</control>
+ <control lang="en" key="IDC_OLD_PIN_HELP">(Empty or 0 for default iterations)</control>
+ <control lang="en" key="IDC_PIN_HELP">(Empty or 0 for default iterations)</control>
<control lang="en" key="IDC_PREF_BKG_TASK_ENABLE">Enabled</control>
<control lang="en" key="IDC_PREF_CACHE_PASSWORDS">Cache passwords in driver memory</control>
<control lang="en" key="IDC_PREF_DISMOUNT_INACTIVE">Auto-dismount volume after no data has been read/written to it for</control>
diff --git a/src/Common/Resource.h b/src/Common/Resource.h
index 4b8c2df5..9cc7b9e2 100644
--- a/src/Common/Resource.h
+++ b/src/Common/Resource.h
@@ -188,6 +188,9 @@
#define IDC_WAIT_PROGRESS_BAR 5126
#define IDC_PKCS5_PRF_ID 5127
#define IDT_PKCS5_PRF 5128
+#define IDT_PIN 5129
+#define IDC_PIN 5130
+#define IDC_PIN_HELP 5131
// Next default values for new objects
//
@@ -196,7 +199,7 @@
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 542
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 5129
+#define _APS_NEXT_CONTROL_VALUE 5132
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif