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::GetSelection method

Gets the character position of a text selection in a document. This method supports multiple text selections. The caller must have a read-only lock on the document before calling this method.

Syntax


HRESULT GetSelection(
  [in]   ULONG ulIndex,
  [in]   ULONG ulCount,
  [out]  TS_SELECTION_ACP *pSelection,
  [out]  ULONG *pcFetched
);

Parameters

ulIndex [in]

Specifies the text selections that start the process. If the TF_DEFAULT_SELECTION constant is specified for this parameter, the input selection starts the process.

ulCount [in]

Specifies the maximum number of selections to return.

pSelection [out]

Receives the style, start, and end character positions of the selected text. These values are put into the TS_SELECTION_ACP structure.

pcFetched [out]

Receives the number of pSelection structures returned.

Return value

This method can return one of these values.

ValueDescription
S_OK

The method was successful.

TS_E_NOLOCK

The caller does not have a read-only lock on the document.

TS_E_NOSELECTION

The document has no selection.

 

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
Miscellaneous Framework Constants
TS_SELECTION_ACP
ITextStoreACP::SetSelection
Edit Contexts

 

 

Community Additions

Show:
© 2014 Microsoft