ITextStoreACP::SetSelection method (textstor.h)

The ITextStoreACP::SetSelection method selects text within the document. The application must have a read/write lock on the document before calling this method.

Syntax

HRESULT SetSelection(
  [in] ULONG                  ulCount,
  [in] const TS_SELECTION_ACP *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_ACP structure.

When the start and end character positions are equal, the method places a caret at that character position. There can be only one caret at a time in the document.

Return value

This method can return one of these values.

Value Description
S_OK
The method was successful.
E_FAIL
An unspecified error occurred.
TF_E_INVALIDPOS
The character positions specified are beyond the text in the document.
TF_E_NOLOCK
The caller does not have a read/write lock.

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

See also

ITextStoreACP

ITextStoreACP::GetSelection

TS_SELECTION_ACP