inputScope 枚举 (inputscope.h)

InputScope 枚举包含的值指定哪些输入范围应用于给定字段。

语法

typedef enum __MIDL___MIDL_itf_inputscope_0000_0000_0001 {
  IS_DEFAULT = 0,
  IS_URL = 1,
  IS_FILE_FULLFILEPATH = 2,
  IS_FILE_FILENAME = 3,
  IS_EMAIL_USERNAME = 4,
  IS_EMAIL_SMTPEMAILADDRESS = 5,
  IS_LOGINNAME = 6,
  IS_PERSONALNAME_FULLNAME = 7,
  IS_PERSONALNAME_PREFIX = 8,
  IS_PERSONALNAME_GIVENNAME = 9,
  IS_PERSONALNAME_MIDDLENAME = 10,
  IS_PERSONALNAME_SURNAME = 11,
  IS_PERSONALNAME_SUFFIX = 12,
  IS_ADDRESS_FULLPOSTALADDRESS = 13,
  IS_ADDRESS_POSTALCODE = 14,
  IS_ADDRESS_STREET = 15,
  IS_ADDRESS_STATEORPROVINCE = 16,
  IS_ADDRESS_CITY = 17,
  IS_ADDRESS_COUNTRYNAME = 18,
  IS_ADDRESS_COUNTRYSHORTNAME = 19,
  IS_CURRENCY_AMOUNTANDSYMBOL = 20,
  IS_CURRENCY_AMOUNT = 21,
  IS_DATE_FULLDATE = 22,
  IS_DATE_MONTH = 23,
  IS_DATE_DAY = 24,
  IS_DATE_YEAR = 25,
  IS_DATE_MONTHNAME = 26,
  IS_DATE_DAYNAME = 27,
  IS_DIGITS = 28,
  IS_NUMBER = 29,
  IS_ONECHAR = 30,
  IS_PASSWORD = 31,
  IS_TELEPHONE_FULLTELEPHONENUMBER = 32,
  IS_TELEPHONE_COUNTRYCODE = 33,
  IS_TELEPHONE_AREACODE = 34,
  IS_TELEPHONE_LOCALNUMBER = 35,
  IS_TIME_FULLTIME = 36,
  IS_TIME_HOUR = 37,
  IS_TIME_MINORSEC = 38,
  IS_NUMBER_FULLWIDTH = 39,
  IS_ALPHANUMERIC_HALFWIDTH = 40,
  IS_ALPHANUMERIC_FULLWIDTH = 41,
  IS_CURRENCY_CHINESE = 42,
  IS_BOPOMOFO = 43,
  IS_HIRAGANA = 44,
  IS_KATAKANA_HALFWIDTH = 45,
  IS_KATAKANA_FULLWIDTH = 46,
  IS_HANJA = 47,
  IS_HANGUL_HALFWIDTH = 48,
  IS_HANGUL_FULLWIDTH = 49,
  IS_SEARCH = 50,
  IS_FORMULA = 51,
  IS_SEARCH_INCREMENTAL = 52,
  IS_CHINESE_HALFWIDTH = 53,
  IS_CHINESE_FULLWIDTH = 54,
  IS_NATIVE_SCRIPT = 55,
  IS_YOMI = 56,
  IS_TEXT = 57,
  IS_CHAT = 58,
  IS_NAME_OR_PHONENUMBER = 59,
  IS_EMAILNAME_OR_ADDRESS = 60,
  IS_PRIVATE = 61,
  IS_MAPS = 62,
  IS_NUMERIC_PASSWORD = 63,
  IS_NUMERIC_PIN = 64,
  IS_ALPHANUMERIC_PIN = 65,
  IS_ALPHANUMERIC_PIN_SET = 66,
  IS_FORMULA_NUMBER = 67,
  IS_CHAT_WITHOUT_EMOJI = 68,
  IS_PHRASELIST = -1,
  IS_REGULAREXPRESSION = -2,
  IS_SRGS = -3,
  IS_XML = -4,
  IS_ENUMSTRING = -5
} InputScope;

常量

| | | ---- | | IS_DEFAULT
值: 0
指示标准识别偏差。 被视为默认值并使用默认词典。 如果与另一个输入范围结合使用,则它不会对另一个输入范围强制强制。 | | IS_URL
值:1
指示 URL、文件或 FTP 格式。 示例包括以下内容。


  • http://www.humongousinsurance.com/

  • ftp://ftp.microsoft.com

  • www.microsoft.com

  • file:///C:\templ.txt

  • $

| | IS_FILE_FULLFILEPATH
值: 2
指示文件路径。 将强制实施以下条件。


  • 对于服务器名称和共享名称, 允许除以下项之外的所有IS_ONECHAR字符:* ? : <> |

  • 对于文件名, 允许除以下项之外的所有IS_ONECHAR字符: \ / : <> |

  • 输入必须以 \ 或驱动器名称或 \ 或 开头。\ 或 .\ 或 /

  • 允许空格。


示例包括以下内容。


  • \servername\sharename\filename.txt

  • C:\temp\current work.doc

  • ../images/hank.jpg

| | IS_FILE_FILENAME
值: 3
指示文件名。 将强制实施以下条件。


  • 接受扩展或不接受扩展。

  • 允许除以下字符以外的所有IS_ONECHAR字符: \ / : <> |

  • 允许空格。


这方面的例子有:


  • filename.txt

  • filename

  • 文件 name.txt

| | IS_EMAIL_USERNAME
值: 4
指示电子邮件用户名。 示例包括以下内容。


  • jeffsm

  • JeffSm

  • Jsmith

  • JSmith

  • jeffsmith

| | IS_EMAIL_SMTPEMAILADDRESS
值: 5
指示完整的 SMTP 电子邮件地址,例如 someone@example.com。 | | IS_LOGINNAME
值: 6
指示登录名和域。 将强制实施以下条件。


  • 允许所有IS_ONECHAR字符。

  • 不允许域或用户名以非字母数字字符开头或结尾。

  • 不允许空格。


示例包括以下内容。


  • CHICAGO\JSMITH

  • JSMITH

| | IS_PERSONALNAME_FULLNAME
值: 7
指示名字、中间名和姓氏的组合。 示例包括以下内容,格式为英语 (美国) 。


  • 小杰夫·史密斯先生

  • Jeff Smith

  • Smith,Jeff

  • Smith,Jeff A

| | IS_PERSONALNAME_PREFIX
值: 8
指示名称前面的荣誉或标题。 示例包括以下内容,格式为英语 (美国) 。


  • 先生。

  • Dr.

  • Miss

  • 先生

| | IS_PERSONALNAME_GIVENNAME
值: 9
指示名字或首字母。 示例包括以下内容,格式为英语 (美国) 。


  • Jeff

  • J.

  • J.A.

| | IS_PERSONALNAME_MIDDLENAME
值: 10
指示中间名或缩写。 示例包括以下内容。


  • Albert

  • A.

| | IS_PERSONALNAME_SURNAME
值: 11
指示姓氏。 示例包括以下内容,格式为英语 (美国) 。


  • Smith

  • 史密斯·琼斯

  • Smith-Jones

| | IS_PERSONALNAME_SUFFIX
值: 12
指示名称后缀缩写或罗马数字。 示例包括以下内容。


  • 小。

  • III

| | IS_ADDRESS_FULLPOSTALADDRESS
值: 13
指示完整地址,包括数字。 示例包括以下内容,格式为英语 (美国) 。


  • 123 Main Street, Anytown, WA 98989

  • PO Box 123 Anytown, WA 98989

| | IS_ADDRESS_POSTALCODE
值: 14
指示字母数字邮政编码。 该值为字母数字,以支持国际邮政编码。 示例包括以下内容,格式为英语 (美国) 。


  • 98989

  • 98989-1234

| | IS_ADDRESS_STREET
值: 15
指示门牌号、街道号、公寓名称和编号以及/或邮政信箱。 示例包括以下内容。


  • 123 Main Street

  • P.O. Box 1234

| | IS_ADDRESS_STATEORPROVINCE
值: 16
指示省/市/自治区/直辖市的全名或缩写。 示例包括以下内容,格式为英语 (美国) 。


  • WA

  • Washington

  • Wa

| | IS_ADDRESS_CITY
值: 17
指示城市的名称或缩写。 示例包括以下内容,格式为英语 (美国) 。


  • 纽约

  • NYC

| | IS_ADDRESS_COUNTRYNAME
值: 18
指示国家/地区的名称。 示例包括以下内容,格式为英语 (美国) 。


  • 意大利

  • 日本

  • 美国

| | IS_ADDRESS_COUNTRYSHORTNAME
值: 19
指示国家/地区名称的缩写。 示例包括以下内容,格式为英语 (美国) 。


  • 美国

  • U.S.A.

| | IS_CURRENCY_AMOUNTANDSYMBOL
值: 20
指示货币符号和数字。 示例包括以下内容,格式为英语 (美国) 。


  • $ 2,100.25

  • $.35

  • $1,234.50 美元

| | IS_CURRENCY_AMOUNT
值: 21
指示货币的数值,不包括货币符号。 例如,2,100.25。 | | IS_DATE_FULLDATE
值: 22
以各种格式指示完整日期。 示例包括以下内容,格式为英语 (美国) 。


  • 07-17-2001

  • 7/17/01

  • 7/17

  • 12 月 12 日

  • 7 月 17 日

  • 2001 年 7 月 17 日

| | IS_DATE_MONTH
值: 23
指示月份的数字表示形式,限制为 1-12。 示例包括以下内容。


  • 7

  • 07

  • 11

| | IS_DATE_DAY
值: 24
指示天数的数字表示形式,限制为 1-31。 示例包括以下内容。


  • 1

  • 04

  • 17

| | IS_DATE_YEAR
值: 25
指示年份的数字表示形式。 示例包括以下内容。


  • 1988

  • 2004

  • 88

  • 04

  • '88

| | IS_DATE_MONTHNAME
值: 26
指示月份的字符表示形式。 示例包括以下内容,格式为英语 (美国) 。


  • 12 月

  • Dec

  • 12 月。

| | IS_DATE_DAYNAME
值: 27
指示天数的字符表示形式。 示例包括以下内容,格式为英语 (美国) 。


  • 星期三

  • 新婚 夫妇

  • 新婚 夫妇。

| | IS_DIGITS
值: 28
指示正整数,限制为 0-9。 | | IS_NUMBER
值: 29
指示数字,包括逗号、负号和十进制数。 对于美国位置,将强制实施以下条件。


  • 千位分隔符为逗号。

  • 小数分隔符是句点。

  • 负数用不带空格的连字符表示,而不是用括号表示。

| | IS_ONECHAR
值: 30
指示单个 ANSI 字符,代码页 1252。 对于美国位置,这包括以下字符。

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdEfghijklmnopqrstuvwxyz0123456789!”#$%&' () *+,-./:;<=>?@[]^_{|}~ | | IS_PASSWORD<br>Value: *31*<br>Indicates a password. <b>IS_PASSWORD</b> is not supported and may be altered or unavailable in the future.<br><br><br><div class="alert"><b>Note</b>  <b>IS_PASSWORD</b> only indicates the password; it doesn't provide any security around the password. All passwords fields should have text services disabled to maintain password secrecy, and therefore it is not valid to have a password field with an <b>IS_PASSWORD</b> input scope.</div><br><div> </div> | | IS_TELEPHONE_FULLTELEPHONENUMBER<br>Value: *33*<br>Indicates telephone country codes. Examples include the following, formatted for English (United States).<br><br><ul><br><li>+1</li><br><li>+44</li><br><li>001</li><br><li>00 44</li><br></ul> | | <br>Value: *32*<br>Indicates a telephone number. Alphabetical input is not allowed. Examples include the following, formatted for English (United States).<br><br><ul><br><li>(206) 555-0123</li><br><li>555-0123</li><br><li>555.0123</li><br><li>206-555-0123</li><br><li>1-206-555-0123x1234</li><br><li>+1 (206) 555-1234</li><br></ul> | | IS_TELEPHONE_AREACODE IS_TELEPHONE_COUNTRYCODE IS_TELEPHONE_LOCALNUMBER<br>Value: *34*<br>Indicates telephone area codes. Examples include the following, formatted for English (United States).<br><br><ul><br><li>(206)</li><br><li>206</li><br></ul> | | IS_TIME_FULLTIME<br>Value: *36*<br>Indicates hours, minutes, seconds, and alphabetical time abbreviations. US English uses the 12 hour clock. Leading zeros are optional for hours but required for minutes and seconds. Hours are constrained to 0-24; minutes and seconds are constrained to 0-59. Examples include the following, formatted for English (United States).<br><br><ul><br><li>3:20</li><br><li>04:30</li><br><li>11:20:55</li><br><li>11:15 am</li><br><li>4:30 AM</li><br></ul> | | <br>Value: *35*<br>Indicates a telephone number, excluding country or area code. Examples include the following, formatted for English (United States).<br><br><ul><br><li>555-0123</li><br><li>555 0123</li><br><li>555.0123</li><br></ul> | | IS_TIME_FULLTIME IS_TIME_HOUR<br>Value: *38*<br>Indicates a numeric representation of minutes or seconds, constrained to 0-59. | | <br>Value: *37*<br>Indicates a numeric representation of hours, constrained to 0-24. | | <br>Value: *39*<br>Indicates full-width number, used for Japanese only. Constrained to full-width numbers and Kanji numbers. | | IS_TIME_MINORSEC IS_NUMBER_FULLWIDTH IS_ALPHANUMERIC_HALFWIDTH<br>Value: *40*<br>Indicates half-width alphanumeric characters for East-Asian languages, constrained to half-width alphabetical characters and numbers. | | IS_ALPHANUMERIC_FULLWIDTH IS_CURRENCY_CHINESE<br>Value: *41*<br>Indicates full-width alphanumeric characters for East-Asian languages, constrained to full-width alphabet characters and numbers. | | <br>Value: *42*<br>Indicates Chinese currency. | | IS_BOPOMOFO<br>Value: *44*<br>Indicates Hiragana characters. | | <br>Value: *45*<br>Indicates half-width Katakana characters. | | <br>Value: *43*<br>Indicates Bopomofo characters. | | IS_CURRENCY_CHINESE IS_HIRAGANA IS_KATAKANA_HALFWIDTH IS_KATAKANA_FULLWIDTH<br>Value: *46*<br>Indicates full-width Katakana characters. | | IS_HANJA IS_HANGUL_HALFWIDTH<br>Value: *47*<br>Indicates Hanja characters. | | <br>Value: *48*<br>Indicates half-width Hangul characters. | | <br>Value: *49*<br>Indicates full-width Hangul characters. | | IS_HANGUL_FULLWIDTH<br>Value: *50*<br><b>Starting with Windows 8:</b> Indicates a search string. | | IS_SEARCH IS_FORMULA<br>Value: *51*<br><b>Starting with Windows 8:</b> Indicates a formula control, for example, a spreadsheet field. | | <br>Value: *52*<br><b>Starting with Windows 10:</b> Indicates input scope is intended for search boxes where incremental results are displayed as the user types. | | IS_SEARCH_INCREMENTAL IS_CHINESE_FULLWIDTH<br>Value: *55*<br><b>Starting with Windows 10:</b> Indicates input scope is intended for native script. | | <br>Value: *54*<br><b>Starting with Windows 10:</b> Indicates input scope is intended for Chinese full-width characters. | | IS_CHINESE_HALFWIDTH<br>Value: *53*<br><b>Starting with Windows 10:</b> Indicates input scope is intended for Chinese half-width characters. | | IS_NATIVE_SCRIPT IS_NATIVE_SCRIPT IS_YOMI<br>Value: *56*<br><b>Starting with Windows 10:</b> Indicates input scope is intended for Japanese names. | | IS_TEXT<br>Value: *59*<br><b>Starting with Windows 10:</b> Indicates input scope is intended for working with a name or telephone number. | | <br>Value: *58*<br><b>Starting with Windows 10:</b> Indicates input scope is intended for chat strings. | | <br>Value: *60*<br><b>Starting with Windows 10:</b> Indicates input scope is intended for working with an email name or full email address. | | <br>Value: *57*<br><b>Starting with Windows 10:</b> Indicates input scope is intended for working with text. | | IS_CHAT IS_NAME_OR_PHONENUMBER IS_EMAILNAME_OR_ADDRESS IS_EMAILNAME_OR_ADDRESS IS_PRIVATE<br>Value: *62*<br><b>Starting with Windows 10:</b> Indicates input scope is intended for working with a map location. | | <br>Value: *63*<br><b>Starting with Windows 10:</b> Indicates expected input is a numeric password, or PIN. | | <br>Value: *61*<br><b>Starting with Windows 10:</b> Indicates input scope is intended for working with private data. | | IS_MAPS IS_NUMERIC_PASSWORD IS_NUMERIC_PIN<br>Value: *65*<br><b>Starting with Windows 10:</b> Indicates expected input is an alphanumeric PIN. | | <br>Value: *-1*<br>Indicates a phrase list. | | <br>Value: *64*<br><b>Starting with Windows 10:</b> Indicates expected input is a numeric PIN. | | <br>Value: *66*<br><b>Starting with Windows 10:</b> Indicates expected input is an alphanumeric PIN for lock screen. | | <br>Value: *67*<br><b>Starting with Windows 10:</b> Indicates expected input is a mathematical formula. | | <br>Value: *68*<br><b>Starting with Windows 10:</b> Indicates expected input does not include emoji. | | IS_ALPHANUMERIC_PIN IS_ALPHANUMERIC_PIN_SET IS_FORMULA_NUMBER IS_CHAT_WITHOUT_EMOJI IS_PHRASELIST IS_REGULAREXPRESSION<br>Value: *-2*<br>Indicates a regular expression. | | <br>Value: *-3*<br>Indicates an XML string that conforms to the Speech Recognition Grammar Specification (SRGS) standard. Information on SRGS can be found at <a href="https://www.w3.org/tr/speech-grammar">http://www.w3.org/TR/speech-grammar</a>. | | IS_SRGS<br>Value: *-4*<br>Indicates a custom xml string. | | IS_XML IS_ENUMSTRING'
值: -5
范围包含 IEnumString 接口指针。 文本输入处理器 (TIP) 可以调用 ITfInputScope2::EnumWordList 来检索它。 |

注解

是否支持给定的输入范围值可能因技术而异。

要求

   
最低受支持的客户端 Windows XP [桌面应用 | UWP 应用]
最低受支持的服务器 Windows Server 2003 [桌面应用 | UWP 应用]
标头 inputscope.h

另请参阅

ITfInputScope

SetInputScope

SetInputScopeXML

SetInputScopes