ITextStoreACP2::GetSelection method (textstor.h)
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
[in] ulIndex
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.
[in] ulCount
Specifies the maximum number of selections to return.
[out] pSelection
Receives the style, start, and end character positions of the selected text. These values are put into the TS_SELECTION_ACP structure.
[out] pcFetched
Receives the number of pSelection structures returned.
Return value
This method can return one of these values.
Value | Description |
---|---|
|
The method was successful. |
|
The caller does not have a read-only lock on the document. |
|
The document has no selection. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | textstor.h |
DLL | Msctf.dll |