Skip to main content
ITextStrings::SetOpCp method

Sets the character position in the source range's story that has desired character formatting attributes. The ITextStrings::EncodeFunction method applies those character formatting attributes to the operators specified by the Char, Char1, and Char2 parameters.

Syntax


HRESULT SetOpCp(
  [in]  long iString,
  [in]  long cp
);

Parameters

iString [in]

Type: long

The index of the string to associate with a character position.

cp [in]

Type: long

The character position in source range's story that has the desired character formatting.

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.

 

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Tom.h

DLL

Msftedit.dll

See also

ITextStrings