网站首页  词典首页

请输入您要查询的函数:

 

术语 gettabbedtextextent
释义 GetTabbedTextExtent
语法:
DWORD GetTabbedTextExtent(
__in HDC hDC,
__in LPCTSTR lpString,
__in int nCount,
__in int nTabPositions,
__in const LPINT lpnTabStopPositions
);
GetTabbedTextExtent功能
该GetTabbedTextExtent函数计算的宽度和高度字符串。如果字符串包含一个或多个制表符,字符串的宽度是根据指定的制表位。该GetTabbedTextExtent函数使用当前选定的字体来计算字符串的尺寸。
参数
hDC [in]
一个句柄,设备上下文。
lpString [in]
一个字符串指针。
nCount [in]
该文本字符串的长度。对于ANSI函数这是一个字节数和Unicode的功能,这个词的罪名。请注意,对于ANSI函数,在半角字符代码页采取每一个字节,而在DBCS代码页最字符需要两个字节;为Unicode的功能,大多数目前的定义Unicode字符(在基本多文种平面(BMP)的)这些都是一个字而Unicode代理人两个词。
nTabPositions [in]
标签数量的一站式数组中的位置指向的lpnTabStopPositions参数。
lpnTabStopPositions [in]
对一个数组,包含标签指针停止位置,设备单位。制表位必须按递增顺序排序,最小的x值应在数组中的第一个项目。
返回值
如果函数成功,返回值是字符串中的逻辑单元的尺寸。高度是在高位字和宽度在低字是。
如果函数失败,返回值为0。 GetTabbedTextExtent就会失败hdc是无效的,如果nTabPositions比0少。
备注
目前的剪辑区域,不影响宽度和GetTabbedTextExtent函数返回的高度。
由于一些设备不发生经常单元阵列(即它们克恩字符的字符),对人物的程度在字符串款额不等于字符串的程度。
如果nTabPositions参数是零,lpnTabStopPositions参数为NULL,标签被扩展到8倍,平均字符宽度。
如果nTabPositions是1,制表分隔由数组中的第一个值指定的距离是lpnTabStopPositions点。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinuser.h(头文件:winuser.h)
LibraryUser32.lib
DLLUser32.dll
Unicode和ANSI namesGetTabbedTextExtentW(Unicode)和GetTabbedTextExtentA(ANSI)的
参见
字体和文字概述
字体和文本函数
GetTextExtentPoint32
TabbedTextOut
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==GetTabbedTextExtent Function
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.
Syntax
DWORD GetTabbedTextExtent(
__in HDC hDC,
__in LPCTSTR lpString,
__in int nCount,
__in int nTabPositions,
__in const LPINT lpnTabStopPositions
);
Parameters
hDC [in]
A handle to the device context.
lpString [in]
A pointer to a character string.
nCount [in]
The length of the text string. For the ANSI function it is a BYTE count and for the Unicode function it is a WORD count. Note that for the ANSI function, characters in SBCS code pages take one byte each, while most characters in DBCS code pages take two bytes; for the Unicode function, most currently defined Unicode characters (those in the Basic Multilingual Plane (BMP)) are one WORD while Unicode surrogates are two WORDs.
nTabPositions [in]
The number of tab-stop positions in the array pointed to by the lpnTabStopPositions parameter.
lpnTabStopPositions [in]
A pointer 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 Value
If the function succeeds, the return value is the dimensions of the string in logical units. 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.
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.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinuser.h (include Windows.h)
LibraryUser32.lib
DLLUser32.dll
Unicode and ANSI namesGetTabbedTextExtentW (Unicode) and GetTabbedTextExtentA (ANSI)
See Also
Fonts and Text Overview
Font and Text Functions
GetTextExtentPoint32
TabbedTextOut
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd144930(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:26:07