Retrieves the characters and/or the character attributes associated with a character-position range.

HRESULT GetText(
   ULONG              cCharacterPosition,
   WCHAR*             pcharText,
   SOURCE_TEXT_ATTR*  pstaTextAttr,
   ULONG*             pcNumChars,
   ULONG              cMaxChars
);

Parameters

cCharacterPosition

[in] Start location of the character position range.

pcharText

[in, out] A character text buffer. The buffer must be large enough to hold cMaxChars characters. If this parameter is NULL, the method does not return characters.

pstaTextAttr

[in, out] A character attribute buffer. The buffer must be large enough to hold cMaxChars characters. If this parameter is NULL, the method does not return attributes.

pcNumChars

[in, out] The number of characters/attributes returned. This parameter must be set to zero before calling this method.

cMaxChars

[in] Number of characters in the character position range. Also specifies the maximum number of characters to return.

Expand imageReturn Value

Expand imageRemarks

Expand imageSee Also