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.
| Value | Description |
|---|---|
|
The method was successful. |
|
The caller does not have a read-only lock on the document. |
|
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 |
|
|
IDL |
|
|
DLL |
|
See also
- ITextStoreACP2
- Miscellaneous Framework Constants
- TS_SELECTION_ACP
- ITextStoreACP::SetSelection
- Edit Contexts