网站首页  词典首页

请输入您要查询的函数:

 

术语 gettextextentexpointi
释义 GetTextExtentExPointI
语法:
BOOL GetTextExtentExPointI(
__in HDC hdc,
__in LPWORD pgiIn,
__in int cgi,
__in int nMaxExtent,
__out LPINT lpnFit,
__out LPINT alpDx,
__out LPSIZE lpSize
);
GetTextExtentExPointI功能
该GetTextExtentExPointI函数检索在指定的字符串,适合在一个特定的空间,并填补了与这些人物在每一个文本程度数组的字符数。 (阿文本的范围之间的空间与性格适合在太空开始的距离。)此信息是有用的字包装计算。
参数
hdc [in]
一个句柄,设备上下文。
pgiIn [in]
阿有权为的程度要检索的标志符号索引数组的指针。
的CGI [in]
在数组中的字型数目指向的pgiIn参数。
nMaxExtent [in]
允许的最大宽度,以逻辑单位,在格式化字符串。
lpnFit [out]
一个整数,它接收的字符将适合由nMaxExtent参数指定的空间最大计数指针。当lpnFit参数为NULL,nMaxExtent参数被忽略。
alpDx [out]
对一个整数数组,接收部分字形程度的指针。数组中的每个元素给出了距离,在逻辑单位之间的数组的标志符号索引开始和一字形适合由nMaxExtent参数指定的空间。虽然这个数组应至少由CGI参数指定的标志符号索引的许多要素,填充功能只在指数中的许多标志符号由lpnFit参数指定的数组的程度。 If lpnDx is NULL, the function does not compute partial string widths.
lpSize [out]
一个规模结构,它接收数组的标志符号指数的层面,逻辑单位,指针。此值不能是NULL。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。
备注
如果同时lpnFit和lpnDx参数是NULL,调用GetTextExtentExPointI功能相当于调用GetTextExtentPointI功能。
当返回文本的范围,此函数假定文本是Level的,那就是,纵始终为0。这是正确的,无论是文字Level和垂直测量。即使使用一种字体指定非零擒,此功能将不使用的角度,而计算的文字的程度。应用程序必须将它明确。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
参见
字体和文字概述
字体和文本函数
GetTextExtentPoint
尺寸
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==GetTextExtentExPointI Function
The GetTextExtentExPointI function retrieves the number of characters in a specified string that will fit within a specified space and fills an array with the text extent for each of those characters. (A text extent is the distance between the beginning of the space and a character that will fit in the space.) This information is useful for word-wrapping calculations.
Syntax
BOOL GetTextExtentExPointI(
__in HDC hdc,
__in LPWORD pgiIn,
__in int cgi,
__in int nMaxExtent,
__out LPINT lpnFit,
__out LPINT alpDx,
__out LPSIZE lpSize
);
Parameters
hdc [in]
A handle to the device context.
pgiIn [in]
A pointer to an array of glyph indices for which extents are to be retrieved.
cgi [in]
The number of glyphs in the array pointed to by the pgiIn parameter.
nMaxExtent [in]
The maximum allowable width, in logical units, of the formatted string.
lpnFit [out]
A pointer to an integer that receives a count of the maximum number of characters that will fit in the space specified by the nMaxExtent parameter. When the lpnFit parameter is NULL, the nMaxExtent parameter is ignored.
alpDx [out]
A pointer to an array of integers that receives partial glyph extents. Each element in the array gives the distance, in logical units, between the beginning of the glyph indices array and one of the glyphs that fits in the space specified by the nMaxExtent parameter. Although this array should have at least as many elements as glyph indices specified by the cgi parameter, the function fills the array with extents only for as many glyph indices as are specified by the lpnFit parameter. If lpnDx is NULL, the function does not compute partial string widths.
lpSize [out]
A pointer to a SIZE structure that receives the dimensions of the glyph indices array, in logical units. This value cannot be NULL.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Remarks
If both the lpnFit and lpnDx parameters are NULL, calling the GetTextExtentExPointI function is equivalent to calling the GetTextExtentPointI function.
When returning the text extent, 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.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
See Also
Fonts and Text Overview
Font and Text Functions
GetTextExtentPoint
SIZE
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd144936(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:23:08