WM_IME_CHAR message

Sent to an application when the IME gets a character of the conversion result. A window receives this message through its WindowProc function.

LRESULT CALLBACK WindowProc(
 HWND  hwnd,
 WM_IME_CHAR,
 WPARAM wParam,
 LPARAM lParam   
);

Parameters

hwnd

A handle to window.

wParam

DBCS: A single-byte or double-byte character value. For a double-byte character, (BYTE)(wParam >> 8) contains the lead byte. Note that the parentheses are necessary because the cast operator has higher precedence than the shift operator.

Unicode: A Unicode character value.

lParam

The repeat count, scan code, extended key flag, context code, previous key state flag, and transition state flag, with values as defined below.

Bit Meaning
0-15 Repeat count. Since the first byte and second byte are continuous, this is always 1.
16-23 Scan code for a complete Asian character.
24 Extended key.
25-28 Not used.
29 Context code.
30 Previous key state.
31 Transition state.

 

Remarks

Unlike the WM_CHAR message for a non-Unicode window, this message can include double-byte and single-byte character values. For a Unicode window, this message is the same as WM_CHAR.

For a non-Unicode window, if the WM_IME_CHAR message includes a double-byte character and the application passes this message to DefWindowProc, the IME converts this message into two WM_CHAR messages, each containing one byte of the double-byte character.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Winuser.h (include Windows.h)

See also