ITextStoreAnchor::SetSelection method (textstor.h)
Selects text within the document.
Syntax
HRESULT SetSelection(
[in] ULONG ulCount,
[in] const TS_SELECTION_ANCHOR *pSelection
);
Parameters
[in] ulCount
Specifies the number of text selections in pSelection.
[in] pSelection
Specifies the style, start, and end character positions of the text selected through the TS_SELECTION_ANCHOR structure. The start anchor member paStart of the structure must never follow the end anchor member paEnd, although they might be at the same location.
When paStart = paEnd, the method places a caret at the anchor location. There can be only one caret at a time in the text stream.
Return value
This method can return one of these values.
Value | Description |
---|---|
|
The method was successful. |
|
An unspecified error occurred. |
|
The method was unable to allocate sufficient memory to complete the operation. |
|
The anchor locations specified are beyond the text in the document. |
|
The caller does not have a read/write lock. |
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 |