Partager via


IXRTextBox::GetSelectedText (Compact 2013)

3/28/2014

This method retrieves the content of the current selection in this text box.

Syntax

virtual HRESULT STDMETHODCALLTYPE GetSelectedText(
    BSTR* pSelectedText
) = 0;

Parameters

  • pSelectedText
    [out] Pointer to a string that contains the selected text in this text box. If no text is selected, the value is an empty string.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

This method returns a string copy of the current selection. When you call IXRTextBox::SetSelectedText, it replaces the current selection by supplying the specified string.

.NET Framework Equivalent

System.Windows.Controls.TextBox.SelectedText

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRTextBox
IXRTextBox::SetSelectedText