Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function recovers the original virtual key value associated with a key input message processed by the IME.

Syntax

UINT ImmGetVirtualKey( 
  HWND
 hWnd
);

Parameters

hWnd

[in] Handle to the window that receives the key message.

Return Value

If TranslateMessageis called by the application, ImmGetVirtualKeyreturns VK_PROCESSKEY; otherwise, it returns the virtual key.

Remarks

Although the IMM sets the virtual key value to VK_PROCESSKEY when the IME processes a given virtual key, an application can recover the original virtual key value with the ImmGetVirtualKeyfunction. This function is only used for key input messages containing the VK_PROCESSKEY value. Applications can only get the original virtual key by using this function after receiving the WM_KEYDOWN(VK_PROCESSKEY) message, and before TranslateMessageis called in its own message loop.

Requirements

Header imm.h
Library Coreimm.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also