Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ITextStoreAnchor::SetSelection method

Syntax


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

ValueDescription
S_OK

The method was successful.

E_FAIL

An unspecified error occurred.

E_OUTOFMEMORY

The method was unable to allocate sufficient memory to complete the operation.

TF_E_INVALIDPOS

The anchor locations 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 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Redistributable

TSF 1.0 on Windows 2000 Professional

Header

Textstor.h

IDL

Textstor.idl

DLL

Msctf.dll

See also

ITextStoreAnchor
TS_SELECTION_ANCHOR
ITextStoreAnchor::GetSelection

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.