Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Inserts text at the selection or insertion point.
Syntax
HRESULT InsertTextAtSelection(
[in] TfEditCookie ec,
[in] DWORD dwFlags,
[in] const WCHAR *pchText,
[in] LONG cch,
[out] ITfRange **ppRange
);
Parameters
[in] ec
Identifies the edit context. This is obtained from ITfDocumentMgr::CreateContext or ITfEditSession::DoEditSession.
[in] dwFlags
Bit field with one of the following values.
[in] pchText
Specifies the text to insert.
[in] cch
Specifies the character count of the text in pchText.
[out] ppRange
Receives the position of the inserted object.
Return value
This method can return one of these values.
Value | Description |
---|---|
|
The method was successful. |
|
The text service does not have a document lock |
|
Context object is not on a document stack. |
|
Context has no selection. |
|
Selection is read-only. |
Remarks
To insert an IDataObject object instead of text, use ITfInsertAtSelection::InsertEmbeddedAtSelection.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | msctf.h |
DLL | Msctf.dll |
Redistributable | TSF 1.0 on Windows 2000 Professional |