mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 08:25:48 +00:00
[IMM32] Rewrite ImmGetVirtualKey (#3889)
Implementing Japanese input. CORE-11700
This commit is contained in:
parent
ad8d8b6628
commit
6b24e73d41
1 changed files with 14 additions and 17 deletions
|
@ -3130,25 +3130,22 @@ BOOL WINAPI ImmGetStatusWindowPos(HIMC hIMC, LPPOINT lpptPos)
|
||||||
*/
|
*/
|
||||||
UINT WINAPI ImmGetVirtualKey(HWND hWnd)
|
UINT WINAPI ImmGetVirtualKey(HWND hWnd)
|
||||||
{
|
{
|
||||||
OSVERSIONINFOA version;
|
HIMC hIMC;
|
||||||
InputContextData *data = ImmGetContext( hWnd );
|
LPINPUTCONTEXTDX pIC;
|
||||||
TRACE("%p\n", hWnd);
|
UINT ret = VK_PROCESSKEY;
|
||||||
|
|
||||||
if ( data )
|
TRACE("(%p)\n", hWnd);
|
||||||
return data->lastVK;
|
|
||||||
|
|
||||||
version.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
|
hIMC = ImmGetContext(hWnd);
|
||||||
GetVersionExA( &version );
|
pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC);
|
||||||
switch(version.dwPlatformId)
|
if (!pIC)
|
||||||
{
|
return ret;
|
||||||
case VER_PLATFORM_WIN32_WINDOWS:
|
|
||||||
return VK_PROCESSKEY;
|
if (pIC->bHasVKey)
|
||||||
case VER_PLATFORM_WIN32_NT:
|
ret = pIC->nVKey;
|
||||||
return 0;
|
|
||||||
default:
|
ImmUnlockIMC(hIMC);
|
||||||
FIXME("%d not supported\n",version.dwPlatformId);
|
return ret;
|
||||||
return VK_PROCESSKEY;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue