Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

StringFormat.SetDigitSubstitution method

Applies to: desktop apps only

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

language [in]

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.

substitute [in]

Type: StringDigitSubstitute

Element of the StringDigitSubstitute enumeration that specifies the digit substitution method to be used.

Return value

Type:

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

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdiplusstringformat.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.