Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ITextStoreACP2::InsertTextAtSelection method

Inserts text at the insertion point or selection. A caller must have a read/write lock on the document before inserting text.

Syntax


HRESULT InsertTextAtSelection(
  [in]                     DWORD         dwFlags,
  [in, size_is(cch)] const WCHAR         *pchText,
  [in]                     ULONG         cch,
  [out]                    LONG          *pacpStart,
  [out]                    LONG          *pacpEnd,
  [out]                    TS_TEXTCHANGE *pChange
);

Parameters

dwFlags [in]
pchText [in]
cch [in]
pacpStart [out]
pacpEnd [out]
pChange [out]

Return value

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

Remarks

The values of the pacpStart and the pacpEnd parameters depend upon how the client application inserts text into a document. For example, if the application sets the cursor at the start of the inserted text after text insertion, then the value for the pacpStart and pacpEnd parameters is the same as the acpStart member of the TS_TEXTCHANGE structure.

Applications should not call the OnTextChange method in response to this method.

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Header

Textstor.h

IDL

Textstor.idl

DLL

Msctf.dll

See also

ITextStoreACP2
OnTextChange
TF_IAS_* Constants
TS_TEXTCHANGE
Compositions

 

 

Community Additions

Show:
© 2015 Microsoft