ITextFont::SetLanguageID method

Sets the language ID or language code identifier (LCID).

Syntax


HRESULT SetLanguageID(
  [inlong Value
);

Parameters

Value [in]

Type: long

The new language identifier. The low word contains the language identifier. The high word is either zero or it contains the high word of the locale identifier LCID. For more information, see Locale Identifiers.

Return value

Type: HRESULT

If the method succeeds, it returns S_OK. If the method fails, it returns one of the following COM error codes. For more information about COM error codes, see Error Handling in COM.

Return codeDescription
E_INVALIDARG

Invalid argument.

CO_E_RELEASED

The font object is attached to a range that has been deleted.

E_ACCESSDENIED

Write access is denied.

E_OUTOFMEMORY

Insufficient memory.

 

Remarks

If the high nibble of Value is tomCharset, set the charrep from the charset in the low byte and the pitch and family from the next byte. See also ITextFont2::SetCharRep.

If the high nibble of Value is tomCharRepFromLcid, set the charrep from the LCID and set the LCID as well. See ITextFont::GetLanguageID for more information.

To set the BCP-47 language tag, such as "en-US", call ITextRange2::SetText2 and set the tomLanguageTag and bstr with the language tag.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Tom.h

DLL

Msftedit.dll

See also

Reference
ITextFont
GetLanguageID
Conceptual
Text Object Model

 

 

Show: