please dont rip this site Prev Next

GetTabbedTextExtent info  Overview  Group

The GetTabbedTextExtent function 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 specified tab stops. The GetTabbedTextExtent function uses the currently selected font to compute the dimensions of the string.

DWORD GetTabbedTextExtent(

    HDC hDC,

// handle of device context

    LPCTSTR lpString,

// address of character string

    int nCount,

// number of characters in string

    int nTabPositions,

// number of tab positions

    LPINT lpnTabStopPositions 

// address of array of tab positions

   );

Parameters

hDC
Identifies the device context.
lpString
Points to a character string.
nCount
Specifies the number of characters in the text string.
nTabPositions
Specifies the number of tab-stop positions in the array pointed to by the lpnTabStopPositions parameter.
lpnTabStopPositions
Points to an array containing the tab-stop positions, in device units. The tab stops must be sorted in increasing order; the smallest x-value should be the first item in the array.

Return Values

If the function succeeds, the return value is the dimensions of the string. The height is in the high-order word and the width is in the low-order word.

If the function fails, the return value is 0. GetTabbedTextExtent will fail if hDC is invalid and if nTabPositions is less than 0. To get extended error information, call GetLastError.

Remarks

The current clipping region does not affect the width and height returned by the GetTabbedTextExtent function.

Because 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 the nTabPositions parameter is zero and the lpnTabStopPositions parameter is NULL, tabs are expanded to eight times the average character width.

If nTabPositions is 1, the tab stops are separated by the distance specified by the first value in the array to which lpnTabStopPositions points.

See Also

GetTextExtentPoint32, HIWORD, LOWORD, TabbedTextOut


file: /Techref/os/win/api/win32/func/src/f40_11.htm, 4KB, , updated: 2000/4/7 11:19, local time: 2024/11/28 00:53,
TOP NEW HELP FIND: 
3.17.155.142:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://ecomorder.com/techref/os/win/api/win32/func/src/f40_11.htm"> GetTabbedTextExtent</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to ecomorder.com!

 

Welcome to ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .