Export (0) Print
Expand All

ITextRangeProvider::GetAttributeValue method

Retrieves the value of the specified text attribute across the text range.

Syntax


HRESULT GetAttributeValue(
  [in]           TEXTATTRIBUTEID attributeId,
  [out, retval]  VARIANT *pRetVal
);

Parameters

attributeId [in]

Type: TEXTATTRIBUTEID

The identifier of the text attribute. For a list of text attribute IDs, see Text Attribute Identifiers.

pRetVal [out, retval]

Type: VARIANT*

Receives one of the following.

  • The address of an object representing the value of the specified attribute. The data type of the value varies depending on the specified attribute. For example, if attributeId is UIA_FontNameAttributeId, GetAttributeValue returns a string that represents the font name of the text range, but if attributeId is UIA_IsItalicAttributeId, GetAttributeValue returns a boolean.
  • The address of the value retrieved by the UiaGetReservedMixedAttributeValue function, if the value of the specified attribute varies over the text range.
  • The address of the value retrieved by the UiaGetReservedNotSupportedValue function, if the specified attribute is not supported by the provider or the control.

This parameter is passed uninitialized.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The GetAttributeValue method should retrieve the attribute value regardless of whether the text is hidden or visible.

Requirements

Minimum supported client

Windows XP [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2003 [desktop apps | Windows Store apps]

Header

UIAutomationCore.h (include UIAutomation.h)

IDL

UIAutomationCore.idl

See also

Reference
ITextProvider
ITextRangeProvider
Conceptual
UI Automation Providers Overview

 

 

Community Additions

ADD
Show:
© 2014 Microsoft