网站首页  词典首页

请输入您要查询的函数:

 

术语 settextjustification
释义 SetTextJustification
语法:
BOOL SetTextJustification(
__in HDC hdc,
__in int nBreakExtra,
__in int nBreakCount
);
SetTextJustification功能
该SetTextJustification函数指定的空间量系统应增加在一个文本字符串字符的突破。增加的空间是当应用程序调用TextOut或ExtTextOut功能。
参数
hdc [in]
一个句柄,设备上下文。
nBreakExtra [in]
总额外的空间,在逻辑单位,被添加到文本行。如果当前的映射模式不是MM_TEXT,由nBreakExtra参数确定的价值转化,并四舍五入至最接近的像素。
nBreakCount [in]
行中的字符数突破。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。
备注
打破字符的空间通常是字符(ASCII 32),但它可能是由一些其他字符字体定义。该GetTextMetrics函数可用于检索字体的突破性质。
在TextOut函数分配到指定的额外的空间分布在系列中的中断字符。
该GetTextExtentPoint32函数,总是使用与SetTextJustification功能。有时GetTextExtentPoint32功能考虑的理由时,计算的理由之前指定的行宽,有时没有。想了解更多的详细信息,请GetTextExtentPoint32。这一宽度之前,必须知道一个适当的nBreakExtra值可以计算。
SetTextJustification可以用来证明行,它包含不同的字体多个字符串。在这种情况下,每个字符串必须合理分开。
由于舍入错误可能出现在的理由,该系统保持运行错误的术语,定义当前错误值。当证明行包含多个运行,GetTextExtentPoint自动使用这个术语时,错误计算下运行的程度,使TextOut融入到新的运行错误。在每行后是有道理的,这个误差项必须清除,以防止它被纳入下一行中。这个词可以通过调用清除设置为零nBreakExtra SetTextJustification。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
参见
字体和文字概述
字体和文本函数
ExtTextOut
GetTextExtentPoint32
GetTextMetrics
TextOut
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==SetTextJustification Function
The SetTextJustification function specifies the amount of space the system should add to the break characters in a string of text. The space is added when an application calls the TextOut or ExtTextOut functions.
Syntax
BOOL SetTextJustification(
__in HDC hdc,
__in int nBreakExtra,
__in int nBreakCount
);
Parameters
hdc [in]
A handle to the device context.
nBreakExtra [in]
The total extra space, in logical units, to be added to the line of text. If the current mapping mode is not MM_TEXT, the value identified by the nBreakExtra parameter is transformed and rounded to the nearest pixel.
nBreakCount [in]
The number of break characters in the line.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Remarks
The break character is usually the space character (ASCII 32), but it may be defined by a font as some other character. The GetTextMetrics function can be used to retrieve a font's break character.
The TextOut function distributes the specified extra space evenly among the break characters in the line.
The GetTextExtentPoint32 function is always used with the SetTextJustification function. Sometimes the GetTextExtentPoint32 function takes justification into account when computing the width of a specified line before justification, and sometimes it does not. For more details on this, see GetTextExtentPoint32. This width must be known before an appropriate nBreakExtra value can be computed.
SetTextJustification can be used to justify a line that contains multiple strings in different fonts. In this case, each string must be justified separately.
Because rounding errors can occur during justification, the system keeps a running error term that defines the current error value. When justifying a line that contains multiple runs, GetTextExtentPoint automatically uses this error term when it computes the extent of the next run, allowing TextOut to blend the error into the new run. After each line has been justified, this error term must be cleared to prevent it from being incorporated into the next line. The term can be cleared by calling SetTextJustification with nBreakExtra set to zero.
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
ExtTextOut
GetTextExtentPoint32
GetTextMetrics
TextOut
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd145094(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:19:09