ITextRangeProvider::FindAttribute Method
Returns a text range subset that has the specified text attribute value.
Syntax
HRESULT FindAttribute( TEXTATTRIBUTEID attributeId, VARIANT val, BOOL backward, ITextRangeProvider **pRetVal );
Parameters
- attributeId
[in] The identifier of the text attribute. For a list of text attribute IDs, see Text Attribute Identifiers.- val
[in] A VARIANT that contains the attribute value to search for. This value must match the type specified for the attribute.- backward
[in] TRUE if the last occurring text range should be returned instead of the first; otherwise FALSE.- pRetVal
[out, retval] The address of a variable that receives a pointer to the ITextRangeProvider interface having a matching attribute and attribute value; otherwise NULL.
Return Value
Returns S_OK if successful, or an error value otherwise.
Remarks
There is no differentiation between hidden and visible text.
See Also