ITfTextEditSink::OnEndEdit method

Syntax

HRESULT OnEndEdit(
  ITfContext    *pic,
  TfEditCookie  ecReadOnly,
  ITfEditRecord *pEditRecord
);

Parameters

pic

Pointer to the ITfContext interface for the edited context.

ecReadOnly

Specifies a TfEditCookie value for read-only access to the context.

pEditRecord

Pointer to the ITfEditRecord interface used to access the modifications to the context.

Return Value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

An edit session with read/write access is requested with a call to the ITfContext::RequestEditSession method using the TF_ES_READWRITE flag, which establishes an ITfEditSession::DoEditSession method to perform the session. When such a ITfEditSession::DoEditSession method completes, TSF calls this method.

A text service can use the ecReadOnly parameter only to view the context. If changes are required, the text service must use an asynchronous call to the ITfContext::RequestEditSession method. However, a text service should modify only text that it previously entered as part of a composition. Otherwise, two or more text services could repeatedly modify the same text. A text service can use the ITfContext::InWriteSession method to determine if it performed the completed edit session.

Requirements

   
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 Imekrcic.dll
Redistributable TSF 1.0 on Windows 2000 Professional

See Also

ITfContext

ITfContext::InWriteSession

ITfContext::RequestEditSession

ITfEditRecord

ITfEditSession::DoEditSession

ITfTextEditSink

TfEditCookie