VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Dlgcode.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-05-26 22:12:46 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-05-26 23:01:53 (GMT)
commit70215e3682345243301d410fc0072f294006403c (patch)
treea36ac199a658370a549a1fec7b1d413ff62f1ad7 /src/Common/Dlgcode.c
parent8ebf5ac605d57eab80b600a7827d2ba48668d887 (diff)
downloadVeraCrypt-70215e3682345243301d410fc0072f294006403c.zip
VeraCrypt-70215e3682345243301d410fc0072f294006403c.tar.gz
Windows: GUI modifications around PIN field
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r--src/Common/Dlgcode.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index 5cf6dba..c9d0129 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, "");
+}
+