|
|

楼主 |
发表于 2006-11-5 18:58:00
|
显示全部楼层
Re:关于游戏中文本的输入解决
WM_IME_CHAR
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
wParam
DBCS: A single- 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 is 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 as well as 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
Windows NT/2000/XP/Vista: Included in Windows NT 4.0 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Imm.h; include Windows.h.
|
|