ScriptRecordDigitSubstitution (Windows CE 5.0)
This function reads the National Language Support (NLS) native digit and digit substitution settings and records them in the SCRIPT_DIGITSUBSTITUTE structure.
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.
psds
[out] Pointer to a SCRIPT_DIGITSUBSTITUTE structure. This structure may be passed later to ScriptApplyDigitSubstitution.
Return Values
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
OS Versions: Windows CE 5.0 and later.
Header: Usp10.h.
Link Library: Uspce.lib.
See Also
ScriptApplyDigitSubstitution | ScriptStringAnalyse | ScriptItemize | SCRIPT_DIGITSUBSTITUTE
Send Feedback on this topic to the authors