From 98dcc7a2e4d677ea63ac65df9bac136f123a4742 Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff <8806350+RaiKoHoff@users.noreply.github.com> Date: Wed, 11 Apr 2018 01:35:42 +0200 Subject: [PATCH] + fix: using correct api to show/hide passphrase --- crypto/crypto.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/crypto/crypto.c b/crypto/crypto.c index d4adbd5a9..419f47eda 100644 --- a/crypto/crypto.c +++ b/crypto/crypto.c @@ -131,12 +131,12 @@ INT_PTR CALLBACK SetKeysDlgProc(HWND hDlg, UINT umsg, WPARAM wParam, LPARAM lPar case IDC_CHECK4: { if (IsDlgButtonChecked(hDlg, IDC_CHECK4) == BST_CHECKED) { - SendMessage(GetDlgItem(hDlg, IDC_EDIT1), EM_SETPASSWORDCHAR, 0, 0); - SendMessage(GetDlgItem(hDlg, IDC_EDIT2), EM_SETPASSWORDCHAR, 0, 0); + SendDlgItemMessage(hDlg, IDC_EDIT1, EM_SETPASSWORDCHAR, 0, 0); + SendDlgItemMessage(hDlg, IDC_EDIT2, EM_SETPASSWORDCHAR, 0, 0); } else { - SendMessage(GetDlgItem(hDlg, IDC_EDIT1), EM_SETPASSWORDCHAR, (WPARAM)wDot, 0); - SendMessage(GetDlgItem(hDlg, IDC_EDIT2), EM_SETPASSWORDCHAR, (WPARAM)wDot, 0); + SendDlgItemMessage(hDlg, IDC_EDIT1, EM_SETPASSWORDCHAR, (WPARAM)wDot, 0); + SendDlgItemMessage(hDlg, IDC_EDIT2, EM_SETPASSWORDCHAR, (WPARAM)wDot, 0); } InvalidateRect(hDlg, NULL, TRUE); } @@ -257,16 +257,15 @@ INT_PTR CALLBACK GetKeysDlgProc(HWND hDlg, UINT umsg, WPARAM wParam, LPARAM lPar case IDC_CHECK4: { if (IsDlgButtonChecked(hDlg, IDC_CHECK4) == BST_CHECKED) { - SendMessage(GetDlgItem(hDlg, IDC_EDIT3), EM_SETPASSWORDCHAR, 0, 0); + SendDlgItemMessage(hDlg, IDC_EDIT3, EM_SETPASSWORDCHAR, 0, 0); } else { - SendMessage(GetDlgItem(hDlg, IDC_EDIT3), EM_SETPASSWORDCHAR, (WPARAM)wDot, 0); + SendDlgItemMessage(hDlg, IDC_EDIT3, EM_SETPASSWORDCHAR, (WPARAM)wDot, 0); } InvalidateRect(hDlg, NULL, TRUE); + return(true); + break; } - return(true); - break; - case IDOK: { bool useMas = (IsDlgButtonChecked(hDlg, IDC_CHECK3) == BST_CHECKED);