ITextStrings::SetOpCp method (tom.h)

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

[in] iString

Type: long

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

[in] cp

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 code Description
E_INVALIDARG
Invalid argument.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header tom.h
DLL Msftedit.dll

See also

ITextStrings