ITextStoreACP::InsertEmbeddedAtSelection method (textstor.h)
The ITextStoreACP::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 object into the document.
Syntax
HRESULT InsertEmbeddedAtSelection(
[in] DWORD dwFlags,
[in] IDataObject *pDataObject,
[out] LONG *pacpStart,
[out] LONG *pacpEnd,
[out] TS_TEXTCHANGE *pChange
);
Parameters
[in] dwFlags
Specifies whether the pacpStart and pacpEnd parameters and the TS_TEXTCHANGE structure 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] pacpStart
Pointer to the starting application character position where the object insertion will occur.
[out] pacpEnd
Pointer to the ending application character position where the object insertion will occur. This parameter value will be the same as the value of the pacpStart parameter for an insertion point.
[out] pChange
Pointer to a TS_TEXTCHANGE structure with the following members.
Return value
This method can return one of these values.
Value | Description |
---|---|
|
The method was successful. |
|
The pchText parameter is invalid. |
|
The caller does not have a lock on the document. |
Remarks
The values of the pacpStart and pacpEnd parameters depend upon how the client application inserts an object into a document. For example, if the application sets the cursor at the start of the object after object insertion, then the value of the pacpStart and pacpEnd parameters is the same as the acpStart member of the TS_TEXTCHANGE structure.
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 | textstor.h |
DLL | Msctf.dll |
Redistributable | TSF 1.0 on Windows 2000 Professional |