ITfProperty::Clear method (msctf.h)

Empties the property value over the specified range.

Syntax

HRESULT Clear(
  [in] TfEditCookie ec,
  [in] ITfRange     *pRange
);

Parameters

[in] ec

Contains an edit cookie that identifies the edit context. This is obtained from ITfDocumentMgr::CreateContext or ITfEditSession::DoEditSession.

[in] pRange

Pointer to an ITfRange interface that contains the range that the property is cleared for. If this parameter is NULL, all values for this property over the entire edit context are cleared.

Return value

This method can return one of these values.

Value Description
S_OK
The method was successful.
E_INVALIDARG
pRange is invalid.
TF_E_NOLOCK
The edit context identified by ec does not have a read/write lock.
TF_E_READONLY
The edit context is read-only.
TF_E_NOTOWNEDRANGE
The TSF manager does not own the range.

Remarks

It is not necessary to call this method when a context is about to be destroyed. The TSF manager will clear all properties when the context is removed from the context stack.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header msctf.h
DLL Msctf.dll
Redistributable TSF 1.0 on Windows 2000 Professional

See also

ITfDocumentMgr::CreateContext

ITfEditSession::DoEditSession

ITfProperty

ITfRange