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::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, size_is(ulCount)]  const TS_SELECTION_ACP *pSelection
);

Parameters

ulCount [in]

Specifies the number of text selections in pSelection.

pSelection [in]

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.

ValueDescription
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

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
TS_SELECTION_ACP
GetSelection

 

 

Community Additions

Show:
© 2014 Microsoft