+ fix: using correct api to show/hide passphrase

This commit is contained in:
Rainer Kottenhoff 2018-04-11 01:35:42 +02:00 committed by GitHub
parent 693df17517
commit 98dcc7a2e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);