网站首页  词典首页

请输入您要查询的函数:

 

术语 gettextextentpoint
释义 GetTextExtentPoint
语法:
BOOL GetTextExtentPoint(
__in HDC hdc,
__in LPCTSTR lpString,
__in int cbString,
__out LPSIZE lpSize
);
GetTextExtentPoint功能
该GetTextExtentPoint函数计算宽度和文本的指定字符串的高度。
注意:此功能仅提供了兼容性与16位的Windows版本。应用程序应该调用GetTextExtentPoint32功能,提供更准确的结果。
参数
hdc [in]
一个句柄,设备上下文。
lpString [in]
一个字符串,指定文本指针。字符串不须零终止,自cbString指定字符串的长度。
cbString [in]
该字符串的长度指向lpString。
lpSize [out]
一个规模结构,它接收字符串的层面,逻辑单位,指针。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。
备注
该GetTextExtentPoint函数使用当前选定的字体来计算字符串的尺寸。宽度和高度的逻辑单位,是计算不考虑任何剪辑。此外,此函数假定文本是Level的,那就是,纵始终为0。这是正确的,无论是文字Level和垂直测量。即使使用一种字体指定非零擒,此功能将不使用的角度,而计算的文字的程度。应用程序必须将它明确。
由于某些设备克恩字符,人物的程度在字符串款额不等于字符串的程度。
计算字符串的宽度考虑到字符间的间隔由SetTextCharacterExtra的功能集。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinGdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode和ANSI namesGetTextExtentPointW(Unicode)和GetTextExtentPointA(ANSI)的
参见
字体和文字概述
字体和文本函数
GetTextExtentPoint32
SetTextCharacterExtra
尺寸
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==GetTextExtentPoint Function
The GetTextExtentPoint function computes the width and height of the specified string of text.
Note This function is provided only for compatibility with 16-bit versions of Windows. Applications should call the GetTextExtentPoint32 function, which provides more accurate results.
Syntax
BOOL GetTextExtentPoint(
__in HDC hdc,
__in LPCTSTR lpString,
__in int cbString,
__out LPSIZE lpSize
);
Parameters
hdc [in]
A handle to the device context.
lpString [in]
A pointer to the string that specifies the text. The string does not need to be zero-terminated, since cbString specifies the length of the string.
cbString [in]
The length of the string pointed to by lpString.
lpSize [out]
A pointer to a SIZE structure that receives the dimensions of the string, in logical units.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Remarks
The GetTextExtentPoint function uses the currently selected font to compute the dimensions of the string. The width and height, in logical units, are computed without considering any clipping. Also, this function assumes that the text is horizontal, that is, that the escapement is always 0. This is true for both the horizontal and vertical measurements of the text. Even if using a font specifying a nonzero escapement, this function will not use the angle while computing the text extent. The application must convert it explicitly.
Because some devices kern characters, the sum of the extents of the characters in a string may not be equal to the extent of the string.
The calculated string width takes into account the intercharacter spacing set by the SetTextCharacterExtra function.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinGdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode and ANSI namesGetTextExtentPointW (Unicode) and GetTextExtentPointA (ANSI)
See Also
Fonts and Text Overview
Font and Text Functions
GetTextExtentPoint32
SetTextCharacterExtra
SIZE
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd144937(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 11:24:24