mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +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)
|
||||
{
|
||||
OSVERSIONINFOA version;
|
||||
InputContextData *data = ImmGetContext( hWnd );
|
||||
TRACE("%p\n", hWnd);
|
||||
HIMC hIMC;
|
||||
LPINPUTCONTEXTDX pIC;
|
||||
UINT ret = VK_PROCESSKEY;
|
||||
|
||||
if ( data )
|
||||
return data->lastVK;
|
||||
TRACE("(%p)\n", hWnd);
|
||||
|
||||
version.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
|
||||
GetVersionExA( &version );
|
||||
switch(version.dwPlatformId)
|
||||
{
|
||||
case VER_PLATFORM_WIN32_WINDOWS:
|
||||
return VK_PROCESSKEY;
|
||||
case VER_PLATFORM_WIN32_NT:
|
||||
return 0;
|
||||
default:
|
||||
FIXME("%d not supported\n",version.dwPlatformId);
|
||||
return VK_PROCESSKEY;
|
||||
}
|
||||
hIMC = ImmGetContext(hWnd);
|
||||
pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC);
|
||||
if (!pIC)
|
||||
return ret;
|
||||
|
||||
if (pIC->bHasVKey)
|
||||
ret = pIC->nVKey;
|
||||
|
||||
ImmUnlockIMC(hIMC);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
Loading…
Reference in a new issue