TextPattern_GetSelection Function

Note  This function is deprecated. Client applications should use the Microsoft UI Automation COM interfaces instead.

Gets the current range of selected text from a text container supporting the text pattern.

Syntax

HRESULT TextPattern_GetSelection(      
    HUIAPATTERNOBJECT hobj,
    HUIATEXTRANGE *pRetVal
);

Parameters

  • hobj
    [in] A control pattern object.
  • pRetVal
    [out] When this function returns, contains the text range spanning the currently selected text in the container. This parameter is passed uninitialized.

Return Value

Returns S_OK if successful or an error value otherwise.

Function Information

Stock Implementation uiautomationcore.dll
Custom Implementation No
Header uiautomationcoreapi.h
Import library uiautomationcore.lib
Minimum operating systems Windows XP