Sets the attributes on a range of text, overriding other attributes on that text.
HRESULT SetTextAttributes( ULONG ulCharOffset, ULONG cChars, SOURCE_TEXT_ATTR* pstaTextAttr );
- ulCharOffset
[in] The location of the start of the text range.
- cChars
[in] The number of characters in the range.
- pstaTextAttr
[in] The source text attributes for the range of text.
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Value | Description |
---|---|
S_OK | The method succeeded. |
It is an error to call SetTextAttributes on a text range before that text is added to the document. Call the AddDBCSText, AddUnicodeText, or AddDeferredText methods to add text to the document.