ITextStoreAnchor::FindNextAttrTransition method (textstor.h)

The ITextStoreAnchor::FindNextAttrTransition method finds the location in the text stream where a transition occurs in an attribute value. The specified attribute to check is application-dependent.

Syntax

HRESULT FindNextAttrTransition(
  [in]  IAnchor         *paStart,
  [in]  IAnchor         *paHalt,
  [in]  ULONG           cFilterAttrs,
  [in]  const TS_ATTRID *paFilterAttrs,
  [in]  DWORD           dwFlags,
  [out] BOOL            *pfFound,
  [out] LONG            *plFoundOffset
);

Parameters

[in] paStart

Pointer to the anchor position at the start of a range to search for an attribute transition.

[in] paHalt

Pointer to the anchor position at the end of a range to search for an attribute transition.

[in] cFilterAttrs

Specifies the number of attributes to check.

[in] paFilterAttrs

Pointer to the TS_ATTRID data type that specifies the attribute to check. Pre-defined attributes are given in tsattrs.h.

[in] dwFlags

Specifies the direction to search for an attribute transition. By default, the method searches forward.

Value Meaning
TS_ATTR_FIND_BACKWARDS
The method searches backward in the text stream.
TS_ATTR_FIND_UPDATESTART
The method positions the input anchor paStart at the next attribute transition, if one is found. Otherwise the input anchor is not modified.
TS_ATTR_FIND_WANT_OFFSET
The plFoundOffset parameter receives the character offset of the attribute transition from paStart.

[out] pfFound

Receives a Boolean value of TRUE if an attribute transition was found, otherwise FALSE is returned.

[out] plFoundOffset

Receives the character offset of the attribute transition from the start anchor paStart.

Return value

This method can return one of these values.

Value Description
S_OK
The method was successful.
E_INVALIDARG
paStart and/or paHalt are invalid.
TS_E_INVALIDPOS
The character positions specified are beyond the text in the document.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header textstor.h
DLL Msctf.dll
Redistributable TSF 1.0 on Windows 2000 Professional

See also

ITextStoreAnchor

TS_ATTRID

TS_ATTR_* Constants