Microsoft Foundation Classes (mfc.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
CDC::GetTabbedTextExtent
◄CDC► ◄Up► ◄Contents► ◄Index► ◄Back►
──Microsoft Foundation Classes──────────────────────────────────────────────
CSize GetTabbedTextExtent( const char FAR* lpString, int nCount,
int nTabPositions,
LPINT lpnTabStopPositions ) const;
Parameter Description
<lpString> Points to a character string. You can also pass a
◄CString► object for this parameter.
<nCount> Specifies the number of characters in the string.
<nTabPositions> Specifies the number of tab-stop positions in the
array pointed to by <lpnTabStopPositions>.
<lpnTabStopPositions> Points to an array of integers containing the
tab-stop positions in pixels. The tab stops must
be sorted in increasing order; back tabs are not
allowed.
Remarks
Computes the width and height of a character string. If the string
contains one or more tab characters, the width of the string is based
upon the tab stops specified by <lpnTabStopPositions>. The function uses
the currently selected font to compute the dimensions of the string.
Since some devices do not place characters in regular cell arrays (that
is, they kern the characters), the sum of the extents of the characters
in a string may not be equal to the extent of the string.
If <nTabPositions> is 0 and <lpnTabStopPositions> is NULL, tabs are
expanded to eight average character widths.
If <nTabPositions> is 1, the tab stops will be separated by the distance
specified by the first value in the array to which <lpnTabStopPositions>
points.
If <lpnTabStopPositions> points to more than a single value, a tab stop
is set for each value in the array, up to the number specified by
<nTabPositions>.
Return Value
The dimensions of the string (in logical units).
See Also
◄CDC::GetTextExtent►, ◄CDC::TabbedTextOut►, ◄::GetTabbedTextExtent►
-♦-