mirror of
https://github.com/reactos/reactos.git
synced 2024-11-07 15:10:53 +00:00
[USER32|WIN32K]
- Convert wParam in WM_*CHAR messages to ANSI in GetMessageA instead of win32k. Fixes wrong characters used in cmake notepad which is ANSI. svn path=/trunk/; revision=54109
This commit is contained in:
parent
5b1ee500b6
commit
412bc985ed
2 changed files with 25 additions and 9 deletions
|
@ -1703,6 +1703,28 @@ DispatchMessageW(CONST MSG *lpmsg)
|
|||
}
|
||||
|
||||
|
||||
static VOID
|
||||
IntConvertMsgToAnsi(LPMSG lpMsg)
|
||||
{
|
||||
CHAR ch[2];
|
||||
WCHAR wch[2];
|
||||
|
||||
switch (lpMsg->message)
|
||||
{
|
||||
case WM_CHAR:
|
||||
case WM_DEADCHAR:
|
||||
case WM_SYSCHAR:
|
||||
case WM_SYSDEADCHAR:
|
||||
case WM_MENUCHAR:
|
||||
wch[0] = LOWORD(lpMsg->wParam);
|
||||
wch[1] = HIWORD(lpMsg->wParam);
|
||||
ch[0] = ch[1] = 0;
|
||||
WideCharToMultiByte(CP_THREAD_ACP, 0, wch, 2, ch, 2, NULL, NULL);
|
||||
lpMsg->wParam = MAKEWPARAM(ch[0] | (ch[1] << 8), 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
@ -1726,6 +1748,8 @@ GetMessageA(LPMSG lpMsg,
|
|||
return Res;
|
||||
}
|
||||
|
||||
IntConvertMsgToAnsi(lpMsg);
|
||||
|
||||
return Res;
|
||||
}
|
||||
|
||||
|
|
|
@ -1030,15 +1030,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
|
|||
for (i = 0; i < cch; ++i)
|
||||
{
|
||||
TRACE("Msg: %x '%lc' (%04x) %08x\n", NewMsg.message, wch[i], wch[i], NewMsg.lParam);
|
||||
if (pWnd->Unicode)
|
||||
NewMsg.wParam = wch[i];
|
||||
else
|
||||
{
|
||||
CHAR ch;
|
||||
if (!NT_SUCCESS(RtlUnicodeToMultiByteN(&ch, sizeof(ch), NULL, &wch[i], sizeof(wch[i]))))
|
||||
WARN("RtlUnicodeToMultiByteN failed!\n");
|
||||
NewMsg.wParam = ch;
|
||||
}
|
||||
NewMsg.wParam = wch[i];
|
||||
MsqPostMessage(pti->MessageQueue, &NewMsg, FALSE, QS_KEY);
|
||||
}
|
||||
bResult = TRUE;
|
||||
|
|
Loading…
Reference in a new issue