Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
The ITfInsertAtSelection::InsertEmbeddedAtSelection method inserts an IDataObject object at the selection or insertion point.
Syntax
HRESULT InsertEmbeddedAtSelection(
[in] TfEditCookie ec,
[in] DWORD dwFlags,
[in] IDataObject *pDataObject,
[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:
TF_IAS_NOQUERY
The ppRange parameter is NULL on exit.
TF_IAS_QUERYONLY
Context is not modified but the ppRange parameter is set as if the insert occurred. Read-only access is sufficient. If this flag is not set, the ec parameter must have read/write access.
TF_IAS_NO_DEFAULT_COMPOSITION
The TSF manager does not create a default composition if a composition is required. The caller must create a composition object that covers the inserted text before releasing the context lock.
[in] pDataObject
Pointer to object to insert.
[out] ppRange
Position of the inserted object. Optional.
Return value
This method can return one of these values.
| Value | Description |
|---|---|
|
The method was successful. |
|
The ec parameter is an invalid edit cookie. |
|
Context object is not on a document stack. |
|
Context has no selection. |
|
Selection is read-only. |
|
Context owner cannot handle objects of the type provided by the pDataObject parameter. |
Remarks
Callers can use the ITfQueryEmbedded::QueryInsertEmbedded method to determine if a particular object type is likely to be accepted by this method.
To insert text instead of an IDataObject object, use the ITfInsertAtSelection::InsertTextAtSelection method.
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 |