ITextStrings::DeleteRange method (tom.h)

Deletes the contents of a given range.

Syntax

HRESULT DeleteRange(
  [in] ITextRange2 *pRange
);

Parameters

[in] pRange

Type: ITextRange2*

The range to delete.

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
S_FALSE
Range is not degenerate.
E_OUTOFMEMORY
Insufficient memory.

Remarks

If the text selected by the range is not completely contained by the string, the method fails.

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