From 70215e3682345243301d410fc0072f294006403c Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 27 May 2015 00:12:46 +0200 Subject: Windows: GUI modifications around PIN field --- src/ExpandVolume/WinMain.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'src/ExpandVolume/WinMain.cpp') diff --git a/src/ExpandVolume/WinMain.cpp b/src/ExpandVolume/WinMain.cpp index f8b3234c..0dc135b1 100644 --- a/src/ExpandVolume/WinMain.cpp +++ b/src/ExpandVolume/WinMain.cpp @@ -447,14 +447,7 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SendMessage (GetDlgItem (hwndDlg, IDC_CACHE), BM_SETCHECK, bCacheInDriver ? BST_CHECKED:BST_UNCHECKED, 0); SendMessage (GetDlgItem (hwndDlg, IDC_PIN), EM_LIMITTEXT, MAX_PIN, 0); - if (*pin >= 0) - { - /* display the given PIN */ - char szTmp[MAX_PIN + 1]; - StringCbPrintfA(szTmp, sizeof(szTmp), "%d", *pin); - - SetDlgItemText (hwndDlg, IDC_PIN, szTmp); - } + SetPin (hwndDlg, IDC_PIN, *pin); SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE, KeyFilesEnable); @@ -554,14 +547,7 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA EnableWindow (GetDlgItem (hwndDlg, IDC_KEYFILES_ENABLE), FALSE); EnableWindow (GetDlgItem (hwndDlg, IDC_KEY_FILES), FALSE); - if (*pin >= 0) - { - /* display the given PIN */ - char szTmp[MAX_PIN + 1]; - StringCbPrintfA(szTmp, sizeof(szTmp), "%d", *pin); - - SetDlgItemText (hwndDlg, IDC_PIN, szTmp); - } + SetPin (hwndDlg, IDC_PIN, *pin); bPrebootPasswordDlgMode = TRUE; } -- cgit v1.2.3