TabbedTextOut

Version 3.0

Syntax

long TabbedTextOut(hDC, X,YlpString,nCount,nTabPositions,lpnTabStopPositions,nTabOrigin)

This function writes a character string on the specified display, using the currently selected font and expanding tabs to the columns specified in the lpnTabStopPositions field.

Parameter Type/Description  

hDC HDC Identifies the device context.  
X int Specifies the logical x-coordinate of the starting point of the string.  
Y int Specifies the logical y-coordinate of the starting point of the string.  
lpString LPSTR Points to the character string that is to be drawn.  
nCount int Specifies the number of characters in the string.  
nTabPositions int Specifies the number of tab-stop positions in the array to which the lpnTabStopPositions points.  
lpnTabStopPositions LPINT 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.  
nTabOrigin int Specifies the logical x-coordinate of the starting position from which tabs are expanded.  

Return Value

The return value specifies the dimensions of the string. The height is in the high-order word; the width is in the low-order word.

Comments

If the nTabPositions parameter is zero the the lpnTabStopPositions parameter 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, then a tab stop is set for each value in the array, up to the number specified by nTabPositions.

The nTabOrigin parameter allows an application to call the TabbedTextOut function several times for a single line. If the application calls TabbedTextOut more than once with the nTabOrigin set to the same value each time, the function expands all tabs relative to the position specified by nTabOrigin.