ImmGetProperty

ImmGetProperty函式用於獲取與輸入法區域設定有關的輸入法編輯器(IME)的性質和功能。該函式在Imm.h中聲明。

基本介紹

  • 中文名:ImmGetProperty
  • 函式原型:DWORD ImmGetProperty
  • 作用:取得輸入法的屬性
  • 適用對象:輸入法
  • 主要參數:hKL,fdwIndex
  • 主要套用:設定輸入法
ImmGetProperty函式原型,功能,參數,返回值,

ImmGetProperty函式原型

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.
[0x000[0x00000002]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.

相關詞條

熱門詞條

聯絡我們