StringFormat::SetDigitSubstitution method (gdiplusstringformat.h)
The StringFormat::SetDigitSubstitution method sets the digit substitution method and the language that corresponds to the digit substitutes.
Syntax
Status SetDigitSubstitution(
[in] LANGID language,
[in] StringDigitSubstitute substitute
);
Parameters
[in] language
Type: LANGID
Sixteen-bit value that forms a NLS language identifier. The identifier specifies the language associated with the substitute digits. For example, if this StringFormat object uses Arabic substitution digits, then this method will return a value that indicates an Arabic language. An NLS language identifier is constructed by the MAKELANGID macro, declared in Winnt.h.
[in] substitute
Type: StringDigitSubstitute
Element of the StringDigitSubstitute enumeration that specifies the digit substitution method to be used.
Return value
Type: Status
If the method succeeds, it returns Ok, which is an element of the Status enumeration.
If the method fails, it returns one of the other elements of the Status enumeration.
Remarks
The digit substitution method, specified by an element of the StringDigitSubstitute enumeration, replaces, in a string, Western European digits with digits that correspond to a user's locale or language.
When specifying LANG_NEUTRAL as the language ID, it is common practice to pass just LANG_NEUTRAL as in the following example:
stat = FontFamily.GetFamilyName(name, LANG_NEUTRAL);
If you are specifying a language other than LANG_NEUTRAL, use MAKELANGID to create the language and sublanguage combination as in the following example:
LANGID language = MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL);
For a list of the available languages and sublanguages, see Winnt.h.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP, Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | gdiplusstringformat.h (include Gdiplus.h) |
Library | Gdiplus.lib |
DLL | Gdiplus.dll |