Compartilhar via


ScriptApplyDigitSubstitution (Windows CE 5.0)

Send Feedback

This function applies the digit substitution settings recorded in a SCRIPT_DIGITSUBSTITUTE structure to the SCRIPT_CONTROL and SCRIPT_STATE structures.

HRESULT WINAPI ScriptApplyDigitSubstitution(  const SCRIPT_DIGITSUBSTITUTE* psds,   SCRIPT_CONTROL* psc,   SCRIPT_STATE* pss);

Parameters

  • psds
    [in] Pointer to a SCRIPT_DIGITSUBSTITUTE structure. If NULL, ScriptApplyDigitSubstitution calls ScriptRecordDigitSubstitution with LOCALE_USER_DEFAULT.
  • psc
    [out] Pointer to a SCRIPT_CONTROL structure. When this function returns, the fContextDigits and uDefaultLanguage members are updated.
  • pss
    [out] Pointer to a SCRIPT_STATE structure. When this function returns, the fDigitSubstitute member will be updated.

Return Values

If the function succeeds, it returns S_OK.

If the DigitSubstitute member of the SCRIPT_DIGITSUBSTITUTE structure is unrecognized, the function returns E_INVALIDARG. If any other unrecoverable error is encountered, it is returned as an HRESULT.

Remarks

The DigitSubstitute member of SCRIPT_DIGITSUBSTITUTE structure is normally set by ScriptRecordDigitSubstitution. However, it may be replaced by any one of the following values:

Value Description
SCRIPT_DIGITSUBSTITUTE_CONTEXT Digits U+0030 to U+0039 are substituted using the language of the prior letters. If there are no prior letters, digits are substituted using the TraditionalDigitLanguage member of the SCRIPT_DIGITSUBSTITUTE structure. This member is normally set to the primary language of the locale passed to ScriptRecordDigitSubstitution.
SCRIPT_DIGITSUBSTITUTE_NATIONAL Digits U+0030 to U+0039 are substituted using the NationalDigitLanguage member of the SCRIPT_DIGITSUBSTITUTE structure. This member is normally set to the national digits returned for the NLS LCTYPE LOCALE_SNATIVEDIGITS by ScriptRecordDigitSubstitution.
SCRIPT_DIGITSUBSTITUTE_NONE Digits are not substituted. Unicode values U+0030 to U+0039 are displayed with Arabic, that is Western, numerals.
SCRIPT_DIGITSUBSTITUTE_TRADITIONAL Digits U+0030 to U+0039 are substituted using the TraditionalDigitLanguage member of the SCRIPT_DIGITSUBSTITUTE structure. This member is normally set to the primary language of the locale passed to ScriptRecordDigitSubstitution.

Requirements

OS Versions: Windows CE 5.0 and later.
Header: Usp10.h.
Link Library: Uspce.lib.

See Also

ScriptRecordDigitSubstitution | SCRIPT_DIGITSUBSTITUTE | SCRIPT_CONTROL | SCRIPT_STATE

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.