pull/37/merge
Frank Fesevur 2016-07-14 12:00:36 +00:00 committed by GitHub
commit bf933de8f3
1 changed files with 9 additions and 0 deletions

View File

@ -238,6 +238,15 @@ UserAuthDialogFunc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
if(param->challenge_echo)
SendMessage(wnd_challenge, EM_SETPASSWORDCHAR, 0, 0);
}
/* Fill the username field with the current Windows username and put the focus on the password field */
WCHAR username[MAX_PATH];
DWORD usernamesize = MAX_PATH;
if (GetUserName(username, &usernamesize))
{
SetDlgItemText(hwndDlg, ID_EDT_AUTH_USER, username);
SendMessage(hwndDlg, WM_NEXTDLGCTL, (WPARAM) GetDlgItem(hwndDlg, ID_EDT_AUTH_PASS), TRUE);
}
if (param->c->state == resuming)
ForceForegroundWindow(hwndDlg);
else