ITextStoreACP::FindNextAttrTransition method (textstor.h)

The ITextStoreACP::FindNextAttrTransition method determines the character position where a transition occurs in an attribute value. The specified attribute to check is application-dependent.

Syntax

HRESULT FindNextAttrTransition(
  [in]  LONG            acpStart,
  [in]  LONG            acpHalt,
  [in]  ULONG           cFilterAttrs,
  [in]  const TS_ATTRID *paFilterAttrs,
  [in]  DWORD           dwFlags,
  [out] LONG            *pacpNext,
  [out] BOOL            *pfFound,
  [out] LONG            *plFoundOffset
);

Parameters

[in] acpStart

Specifies the character position to start the search for an attribute transition.

[in] acpHalt

Specifies the character position to end the 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.

[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.
TS_ATTR_FIND_WANT_OFFSET
The plFoundOffset parameter receives the character offset of the attribute transition from acpStart.

[out] pacpNext

Receives the next character position to check for an attribute transition.

[out] pfFound

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

[out] plFoundOffset

Receives the character position of the attribute transition (not ACP positions). If TS_ATTR_FIND_WANT_OFFSET flag is set in dwFlags, receives the character offset of the attribute transition from acpStart.

Return value

This method can return one of these values.

Value Description
S_OK
The method was successful.
TS_E_INVALIDPOS
The character positions specified are beyond the text in the document.

Remarks

Note  If an application does not implement ITextStoreACP::FindNextAttrTransition, ITfReadOnlyProperty::EnumRanges fails with E_FAIL.
 

Requirements

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

See also

ITextStoreACP

TS_ATTRID

TS_ATTR_* Constants