次の方法で共有


ScriptRecordDigitSubstitution (Windows Embedded CE 6.0)

1/6/2010

This function reads the National Language Support (NLS) native digit and digit substitution settings and records them in the SCRIPT_DIGITSUBSTITUTE structure.

Syntax

HRESULT WINAPI ScriptRecordDigitSubstitution(
  LCID Locale,
  SCRIPT_DIGITSUBSTITUTE* psds
);

Parameters

  • Locale
    [in] NLS locale to be queried. Typically, it should be set to LOCALE_USER_DEFAULT. Alternatively, it can be a locale combined with LOCALE_NOUSEROVERRIDE to obtain the default settings.

    Note that context digit substitution is supported only in Arabic and Farsi locales. In other locales, context digit substitution is mapped to no substitution.

Return Value

If successful, the function returns S_OK.

If psds is NULL, the function returns E_POINTER.

If Locale is invalid or not installed, the function returns E_INVALIDARG.

If any other unrecoverable error is encountered, it is returned as an HRESULT.

Remarks

The typical way to call this function is:

SCRIPT_DIGITSUBSTITUTE sds;
ScriptRecordDigitSubstitution(LOCALE_USER_DEFAULT, &sds);

At every itemization, you can use the results like this:

SCRIPT_CONTROL sc = {0};
SCRIPT_STATE   ss = {0};
ScriptApplyDigitSubstitution(&sds, &sc, &ss);

For performance reasons you should not call ScriptRecordDigitSubstitution frequently. In particular, it requires considerable overhead to call it every time you call ScriptItemize or ScriptStringAnalyse. Instead, you can save the SCRIPT_DIGITSUBSTITUTE structure and update it only when you receive a WM_SETTINGCHANGE message

Requirements

Header usp10.h
Library Uspce.lib
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

ScriptApplyDigitSubstitution
ScriptStringAnalyse
ScriptItemize
SCRIPT_DIGITSUBSTITUTE

Other Resources

Uniscribe Functions