UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:textstor.ITextStoreACP2.SetText |
ITextStoreACP2::SetText (textstor.h) |
Sets the text selection to the supplied character positions. |
|
tsf\itextstoreacp2_settext.htm |
TSF |
a00b8273-1690-4cf5-899f-afcb1092bfe8 |
12/05/2018 |
ITextStoreACP2 interface [Text Services Framework],SetText method, ITextStoreACP2.SetText, ITextStoreACP2::SetText, SetText, SetText method [Text Services Framework], SetText method [Text Services Framework],ITextStoreACP2 interface, acpNewEnd, acpOldEnd, acpStart, textstor/ITextStoreACP2::SetText, tsf.itextstoreacp2_settext |
textstor.h |
Windows |
Windows 8 [desktop apps \| UWP apps] |
Windows Server 2012 [desktop apps \| UWP apps] |
Textstor.idl |
Msctf.dll |
Windows |
19H1 |
|
|
|
|
|
|
Sets the text selection to the supplied character positions.
If set to the value of TS_ST_CORRECTION, the text is a transform (correction) of existing content, and any special text markup information (metadata) is retained, such as .wav file data or a language identifier. The client defines the type of markup information to be retained.
Specifies the starting character position of the text to replace.
Specifies the ending character position of the text to replace. This parameter is ignored if the value is 1.
Specifies the pointer to the replacement text. The text string does not have to be NULL terminated, because the text character count is specified in the cch parameter.
Specifies the number of characters in the replacement text.
Pointer to a TS_TEXTCHANGE structure with the following data.
This method can return one of these values.
Value | Description |
---|---|
|
The method was successful. |
|
The acpStart or acpEnd parameter is outside of the document text. |
|
The caller does not have a read/write lock. |
|
The document is read-only. Content cannot be modified. |
|
An attempt was made to modify text across a region boundary. |
Applications should start a composition by first using InsertTextAtSelection. SetText should be used only within an existing composition. If there is no active composition at the time SetText is called, the TSF manager creates a composition that lasts just long enough to wrap the call to SetText.
The acpStart and acpEnd character positions cannot be outside the document range.
Applications should not call the OnTextChange method in response to this method.
This method should call the SetSelection method to select the text to be changed. After successfully executing the SetSelection method, this method then calls the InsertTextAtSelection method to perform the actual text change.