ITextStoreAnchor::InsertEmbeddedAtSelection method (textstor.h)
The ITextStoreAnchor::InsertEmbeddedAtSelection method inserts an IDataObject object at the insertion point or selection. The client that calls this method must have a read/write lock before inserting an IDataObject into the text stream.
Syntax
HRESULT InsertEmbeddedAtSelection(
[in] DWORD dwFlags,
[in] IDataObject *pDataObject,
[out] IAnchor **ppaStart,
[out] IAnchor **ppaEnd
);
Parameters
[in] dwFlags
Specifies whether the paStart and paEnd parameters will contain the results of the object insertion.
The TF_IAS_NOQUERY and TF_IAS_QUERYONLY flags cannot be combined.
[in] pDataObject
Pointer to the IDataObject object to be inserted.
[out] ppaStart
Pointer to the anchor object at the start of the object insertion.
[out] ppaEnd
Pointer to the anchor object at the end of the object insertion. For an insertion point, this parameter value will be the same as the value of the ppaStart parameter.
Return value
This method can return one of these values.
Value | Description |
---|---|
|
The method was successful. |
|
The method could not instantiate one of the anchors paStart or paEnd. |
|
The pchText parameter is invalid. |
|
The method could not instantiate one of the anchors paStart or paEnd. |
|
The caller does not have a lock on the document. |
Remarks
Clients must use this method to insert an object into a text stream, since a TS_CHAR_EMBEDDED constant cannot be passed into ITextStoreAnchor::SetText.
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 | textstor.h |
DLL | Msctf.dll |
Redistributable | TSF 1.0 on Windows 2000 Professional |