UNICODE support for git-askpass

This commit is contained in:
Roy Qu 2024-03-08 07:11:24 +08:00
parent 7fccf45c95
commit 1abcfc67f0
1 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@
#include <windowsx.h> #include <windowsx.h>
#include "resource.h" #include "resource.h"
#include <stdio.h> #include <stdio.h>
#include <tchar.h>
HINSTANCE hInst; HINSTANCE hInst;
@ -37,9 +38,9 @@ LRESULT CALLBACK TxtPasswordWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
switch(msg) { switch(msg) {
case WM_KEYDOWN: case WM_KEYDOWN:
if (wParam==VK_RETURN) { if (wParam==VK_RETURN) {
char s[500+1]; TCHAR s[500+1];
Edit_GetText(hwndTxtPassword,s,500); Edit_GetText(hwndTxtPassword,s,500);
printf("%s", s); _tprintf(_T("%s"), s);
DestroyWindow(hMainDlg); DestroyWindow(hMainDlg);
return TRUE; return TRUE;
} }