mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 06:30:46 +00:00
user32: Map WM_CHAR wparam in ASCII to Unicode in IsDialogMessageA() for CJK locales.
Fix displaying Chinese characters as "??" in some applications with Chinese locale.
This commit is contained in:
parent
fe594a83d4
commit
109d15ab35
|
@ -814,8 +814,12 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetMessageA( MSG *msg, HWND hwnd, UINT first, UINT
|
|||
*/
|
||||
BOOL WINAPI IsDialogMessageA( HWND hwndDlg, LPMSG pmsg )
|
||||
{
|
||||
enum wm_char_mapping mapping;
|
||||
MSG msg = *pmsg;
|
||||
map_wparam_AtoW( msg.message, &msg.wParam, WMCHAR_MAP_NOMAPPING );
|
||||
|
||||
mapping = GetSystemMetrics( SM_DBCSENABLED ) ? WMCHAR_MAP_ISDIALOGMESSAGE : WMCHAR_MAP_NOMAPPING;
|
||||
if (!map_wparam_AtoW( msg.message, &msg.wParam, mapping ))
|
||||
return TRUE;
|
||||
return IsDialogMessageW( hwndDlg, &msg );
|
||||
}
|
||||
|
||||
|
|
|
@ -575,10 +575,7 @@ static LRESULT CALLBACK test_IsDialogMessageA_proc(HWND hwnd, UINT msg, WPARAM w
|
|||
{
|
||||
case WM_CHAR:
|
||||
if (GetSystemMetrics(SM_DBCSENABLED))
|
||||
{
|
||||
todo_wine
|
||||
ok(wparam == 0x5b57, "Got unexpected wparam %#Ix.\n", wparam);
|
||||
}
|
||||
else
|
||||
ok(wparam == 0x3f, "Got unexpected wparam %#Ix.\n", wparam);
|
||||
wm_char_count++;
|
||||
|
@ -879,7 +876,6 @@ static void test_IsDialogMessage(void)
|
|||
DispatchMessageA(&msg);
|
||||
}
|
||||
}
|
||||
todo_wine_if(GetSystemMetrics(SM_DBCSENABLED))
|
||||
ok(wm_char_count == 1, "Got unexpected WM_CHAR count %d.\n", wm_char_count);
|
||||
DestroyWindow(g_hwndMain);
|
||||
}
|
||||
|
|
|
@ -135,6 +135,7 @@ enum wm_char_mapping
|
|||
WMCHAR_MAP_RECVMESSAGE,
|
||||
WMCHAR_MAP_DISPATCHMESSAGE,
|
||||
WMCHAR_MAP_CALLWINDOWPROC,
|
||||
WMCHAR_MAP_ISDIALOGMESSAGE,
|
||||
WMCHAR_MAP_COUNT,
|
||||
WMCHAR_MAP_NOMAPPING = WMCHAR_MAP_COUNT
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue