ImmGetProperty

更新时间:2024-03-22 19:51

ImmGetProperty函数用于获取与输入法区域设置有关的输入法编辑器(IME)的性质和功能。该函数在Imm.h中声明。

函数原型

DWORD ImmGetProperty( HKLhKL,DWORDfdwIndex);

功能

取得输入法的属性(特性)。MSDN: The ImmGetProperty function retrieves the property and capabilities of the IME associated with the specified input locale.

参数

hKL:输入法区域设置标识符。

fdwIndex:要获取的属性信息的类型。这个参数有以下这些值:

[ -4]IGP_GETIMEVERSION:输入法接口所使用的版本。MSDN: Retrieves the system version number for which the specified IME was created.

[0x04]IGP_PROPERTY:输入属性。MSDN: Property information.

[0x08]IGP_CONVERSION:组字属性。MSDN: Conversion capabilities.

[0x0C]IGP_SENTENCE:组句属性。MSDN: Sentence mode capabilities.

[0x10]IGP_UI:用户界面(主要是文本旋转特性)。MSDN: User interface capabilities.

[0x14]IGP_SETCOMPSTR:设置组字串的能力。MSDN: Composition string capabilities.

[0x18]IGP_SELECT:切换输入法的继承特性。MSDN: Selection inheritance capabilities.

返回值

返回该输入法属性。根据fdwIndex所填的常数而返回不同的属性:

IGP_GETIMEVERSION:

[0x0003000A]IMEVER_0310:该输入法基于 Windows 3.1。MSDN: The IME was created for Windows 3.1

[0x00040000]IMEVER_0400:该输入法基于 Windows 9X(不要奇怪,现在WinXP改用TSF了)。MSDN: The IME was created for Windows 95/98/Me.

IGP_PROPERTY:

[0x00010000]IME_PROP_AT_CARET:组字窗口在插入符(caret,文本光标所在位置)附近(如微软拼音、紫光拼音)。MSDN: If set, conversion window is at the caret position. If clear, the window is near caret position.

[0x00020000]IME_PROP_SPECIAL_UI:该输入法有自己的特殊窗口(如微软拼音、紫光拼音),应用程序不能自己绘制输入法窗口。MSDN: If set, IME has a nonstandard user interface. The application should not draw in the IME window.

[0x00040000]IME_PROP_CANDLIST_START_FROM_1:(使用时)候选窗口中的列表是从1开始编号的。MSDN: If set, strings in the candidate list are numbered starting at 1. If clear, strings start at 0.

[0x00080000]IME_PROP_UNICODE:该输入法是支持Unicode的。MSDN: If set, the IME is viewed as a Unicode IME. The system and the IME will communicate through the Unicode IME interface. If clear, IME will use the ANSI interface to communicate with the system.

[0x00100000]IME_PROP_COMPLETE_ON_UNSELECT:当窗口失去焦点时,也将当前输入字符串提交。MSDN: Windows 98/Me, Windows 2000/XP: If set, the IME will complete the composition string when the IME is deactivated. If clear, the IME will cancel the composition string when the IME is deactivated (for example, from a keyboard layout change).

[0x00000020]IME_PROP_ACCEPT_WIDE_VKEY:输入法发送Unicode字符数据是用SendInput发送VK_PACKET。MSDN: Windows 2000/XP: If set, the IME processes the injected Unicode that came from the SendInput function by using VK_PACKET. If clear, the IME might not process the injected Unicode, and the injected Unicode might be sent to the application directly.

IGP_CONVERSION:

[0x0000]IME_CMODE_ALPHANUMERIC:英文字母和数字输入。

[0x0001]IME_CMODE_NATIVE:本地语言输入。MSDN: Set to 1 if NATIVE mode; 0 if ALPHANUMERIC mode.

[0x0002]IME_CMODE_KATAKANA:[日]片假名。MSDN: Set to 1 if KATAKANA mode; 0 if HIRAGANA mode.

[0x0003]IME_CMODE_LANGUAGE:???。

[0x0008]IME_CMODE_FULLSHAPE:全角/半角。MSDN: Set to 1 if full shape mode; 0 if half shape mode.

[0x0010]IME_CMODE_ROMAN:[日?]罗马?。MSDN: Set to 1 if ROMAN input mode; 0 if not.

[0x0020]IME_CMODE_CHARCODE:直接输入字符内码?MSDN: Set to 1 if character code input mode; 0 if not.

[0x0040]IME_CMODE_HANJACONVERT:[韩]汉字字符模式。MSDN: Set to 1 if HANJA convert mode; 0 if not.

[0x0080]IME_CMODE_SOFTKBD:软键盘。MSDN: Set to 1 if Soft Keyboard mode; 0 if not.

[0x0100]IME_CMODE_NOCONVERSION:不转换。MSDN: Set to 1 to prevent processing of conversions by IME; 0 if not.

[0x0200]IME_CMODE_EUDC:用户自定义字符。MSDN: Set to 1 if EUDC conversion mode; 0 if not.

[0x0400]IME_CMODE_SYMBOL:中文标点。MSDN: Set to 1 if SYMBOL conversion mode; 0 if not.

[0x0800]IME_CMODE_FIXED:???MSDN: Windows 98/Me, Windows 2000/XP: Set to 1 if fixed conversion mode; 0 if not.

IGP_SENTENCE:

[0x0000]IME_SMODE_NONE:没有组句信息。MSDN: No information for sentence.

[0x0001]IME_SMODE_PLAURALCLAUSE:有多个子句信息。MSDN: The IME uses plural clause information to carry out conversion processing.

[0x0002]IME_SMODE_SINGLECONVERT:单字符模式。MSDN: The IME carries out conversion processing in single-character mode.

[0x0004]IME_SMODE_AUTOMATIC:自动模式。MSDN: The IME carries out conversion processing in automatic mode.

[0x0008]IME_SMODE_PHRASEPREDICT:词语联想。MSDN: The IME uses phrase information to predict the next character.

[0x0010]IME_SMODE_CONVERSATION:逐键提示。MSDN: The IME uses conversation mode. This is useful for chat applications.

IGP_UI:

[0x00000001]UI_CAP_2700:支持0度和270度排版(中文竖行排版)。MSDN: Supports text escapement values of 0 or 2700. For more information, see the lfEscapement member of the LOGFONT structure.

[0x00000002]UI_CAP_ROT90:支持所有90度排版。MSDN: Supports text escapement values of 0, 900, 1800, or 2700. For more information, see lfEscapement.

[0x00000004]UI_CAP_ROTANY:支持任意角度排版。MSDN: Supports any text escapement value. For more information, see lfEscapement.

IGP_SETCOMPSTR:

[0x00000001]SCS_CAP_COMPSTR:能够调用ImmSetCompositionString设置组字串。MSDN: Can create the composition string by calling the ImmSetCompositionString function with the SCS_SETSTR value.

[0x00000002]SCS_CAP_MAKEREAD:能够修改输入串。MSDN: Can create the reading string from corresponding composition string when using the ImmSetCompositionString function with SCS_SETSTR and without setting lpRead.

[0x00000004]SCS_CAP_SETRECONVERTSTRING:能够使用SCS_SETRECONVERTSTRING常数。MSDN: This IME can support reconversion. Use ImmSetCompositionString to do reconversion.

IGP_SELECT:

[0x00000001]SELECT_CAP_CONVERSION:能够继承组字属性。MSDN: Inherits conversion mode when a new IME is selected.

[0x00000002]SELECT_CAP_SENTENCE:能够继承组句属性。MSDN: Inherits sentence mode when a new IME is selected.

[0x0000x00000002]SELECT_CAP_SENTENCE:能够继承组句属性。MSDN: Inherits sentence mode when a new IME is selected.

[00002]SELECT_CAP_SENTENCE:能够继承组句属性。MSDN: Inherits sentence mode when a new IME is selected.

免责声明
隐私政策
用户协议
目录 22
0{{catalogNumber[index]}}. {{item.title}}
{{item.title}}