mirror of
https://github.com/reactos/reactos.git
synced 2025-06-29 18:51:29 +00:00
- Fix API see CORE-8107.
svn path=/trunk/; revision=63210
This commit is contained in:
parent
b9cff19fca
commit
d68dcedf68
1 changed files with 18 additions and 13 deletions
|
@ -344,21 +344,26 @@ HACCEL WINAPI CreateAcceleratorTableA(LPACCEL lpaccl, int cEntries)
|
||||||
*/
|
*/
|
||||||
int WINAPI TranslateAcceleratorA(HWND hWnd, HACCEL hAccTable, LPMSG lpMsg)
|
int WINAPI TranslateAcceleratorA(HWND hWnd, HACCEL hAccTable, LPMSG lpMsg)
|
||||||
{
|
{
|
||||||
MSG mCopy = *lpMsg;
|
switch (lpMsg->message)
|
||||||
CHAR cChar;
|
{
|
||||||
WCHAR wChar;
|
case WM_KEYDOWN:
|
||||||
NTSTATUS Status;
|
case WM_SYSKEYDOWN:
|
||||||
|
return TranslateAcceleratorW( hWnd, hAccTable, lpMsg );
|
||||||
|
|
||||||
if(!U32IsValidAccelMessage(lpMsg->message)) return 0;
|
case WM_CHAR:
|
||||||
|
case WM_SYSCHAR:
|
||||||
|
{
|
||||||
|
MSG msgW = *lpMsg;
|
||||||
|
char ch = LOWORD(lpMsg->wParam);
|
||||||
|
WCHAR wch;
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, &ch, 1, &wch, 1);
|
||||||
|
msgW.wParam = MAKEWPARAM(wch, HIWORD(lpMsg->wParam));
|
||||||
|
return TranslateAcceleratorW( hWnd, hAccTable, &msgW );
|
||||||
|
}
|
||||||
|
|
||||||
Status = RtlMultiByteToUnicodeN(&wChar, sizeof(wChar), NULL, &cChar, sizeof(cChar));
|
default:
|
||||||
if(!NT_SUCCESS(Status))
|
return 0;
|
||||||
{
|
}
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TranslateAcceleratorW(hWnd, hAccTable, &mCopy);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue