ITextStoreACP2::RequestAttrsAtPosition method (textstor.h)

Gets text attributes at the specified character position.

Syntax

HRESULT RequestAttrsAtPosition(
  [in] LONG            acpPos,
  [in] ULONG           cFilterAttrs,
  [in] const TS_ATTRID *paFilterAttrs,
  [in] DWORD           dwFlags
);

Parameters

[in] acpPos

Specifies the application character position in the document.

[in] cFilterAttrs

Specifies the number of attributes to obtain.

[in] paFilterAttrs

Pointer to the TS_ATTRID data type that specifies the attribute to verify.

[in] dwFlags

Specifies attributes for the call to the RetrieveRequestedAttrs method. If this parameter is not set, the method returns the attributes that start at the specified position. Other possible values for this parameter are the following.

Value Meaning
TS_ATTR_FIND_WANT_END
Obtains the attributes that end at the specified application character position.
TS_ATTR_FIND_WANT_VALUE
Obtains the value of the attribute in addition to the attribute. The attribute value is put into the varValue member of the TS_ATTRVAL structure during the RetrieveRequestedAttrs method call.

Return value

This method can return one of these values.

Value Description
S_OK
The method was successful.

Remarks

In the sentence, "This is italic text.", the italic attribute starts before the word italic and ends after the word text.

If the flag TS_ATTR_FIND_WANT_END is set in dwFlags, the method would return the italic attribute for the text "italic <anchor>normal", because there is an end transition at the anchor location.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header textstor.h
DLL Msctf.dll

See also

ITextStoreACP2

RetrieveRequestedAttrs

TS_ATTRID

TS_ATTRVAL

TS_ATTR_* Constants