网站首页  词典首页

请输入您要查询的函数:

 

术语 exttextout
释义 ExtTextOut
语法:
BOOL ExtTextOut(
__in HDC hdc,
__in int X,
__in int Y,
__in UINT fuOptions,
__in const RECT *lprc,
__in LPCTSTR lpString,
__in UINT cbCount,
__in const INT *lpDx
);
ExtTextOut函数
该ExtTextOut函数绘制文本使用当前选择的字体,背景颜色和文字颜色。您可以选择提供用于剪辑,opaquing,或这两个方面。
参数
hdc [in]
一个句柄,设备上下文。
X [in]
的x坐标,在逻辑坐标,用于字符串中的位置参考点。
y [in]
在y坐标,在逻辑坐标,用于字符串中的位置参考点。
fuOptions [in]
指定如何使用应用程序定义的矩形。此参数可以是一个或多个下列值。
ValueMeaning
ETO_CLIPPEDThe文本将被夹在矩形。
ETO_GLYPH_INDEXThe lpString阵列是指从GetCharacterPlacement返回一个数组,应该由GDI直接解析,因为没有更多的语言,具体的处理是必需的。字形索引只适用于TrueType字体,但可用于标志位图和矢量字体用来表明没有进一步的语言处理是必要的和GDI应直接处理字符串。请注意,所有字形指标是16即使字符串被假定为8一系列的光栅字体位值位值。
对于ExtTextOutW,标志符号索引保存到图元文件。然而,以显示图元文件播放,必须使用相同的字体正确的字符。对于ExtTextOutA,标志符号索引不能保存。
ETO_IGNORELANGUAGEReserved系统使用。如果应用程序设置此标志,它就会失去国际脚本支持,在某些情况下它可能会显示没有文字的。
ETO_NUMERICSLATINTo显示数字,使用欧洲数字。
ETO_NUMERICSLOCALTo显示数字,数字使用适当的语言环境。
ETO_OPAQUEThe当前的背景颜色应该用来填充矩形。
ETO_PDYWhen这是设置,数组指向lpDx包含值对。每对第一个值是,像往常一样,在相邻字符之间的距离细胞的起源,但第二个值是沿垂直方向位移字体。
ETO_RTLREADINGMiddle东亚语言版本的Windows:如果该值指定和希伯来文或阿拉伯文字体到设备上下文选择,该字符串输出使用从右到左的阅读顺序。如果此值未指定字符串的左到右顺序输出。同样的效果可以通过设置在SetTextAlign TA_RTLREADING价值。此值是为了向后兼容。
在ETO_GLYPH_INDEX和ETO_RTLREADING值不能同时使用。由于ETO_GLYPH_INDEX意味着所有语言处理工作已经完成,该函数忽略ETO_RTLREADING标志,如果同时指定。
利比里亚炼油公司 [in]
对一个可选的RECT结构,指定的尺寸指针,在逻辑坐标,一个是用于裁剪矩形opaquing使用,或两者兼而有之。
lpString [in]
一个字符串,它指定文本指针要绘制。字符串不须零终止,自cbCount指定字符串的长度。
cbCount [in]
该字符串的长度指向lpString。
此值不得超过8192。
lpDx [in]
对一个可选的值数组的指针,表明了相邻字符之间的距离细胞来源。例如,lpDx [一]逻辑单位的个别细胞的特征性细胞i和i起源+ 1。
返回值
如果字符串中签后,返回非零值。但是,如果ExtTextOut ANSI版本与ETO_GLYPH_INDEX调用,该函数返回TRUE,即使函数什么都不做。
如果函数失败,返回值是零。
备注
目前的文本对齐设置为指定的设备上下文确定的基准点是用来放置文本。文本对齐设置检索调用GetTextAlign功能。文本对齐设置改变了调用SetTextAlign函数。
如果lpDx参数为NULL,ExtTextOut函数使用默认的字符之间的间距。字符细胞的起源和数组的内容指出的lpDx参数是逻辑单位指定。字符细胞来源的定义是字符的单元格左上角。
默认情况下,目前的情况是不使用或通过此功能进行更新。但是,应用程序可以调用设置为TA_UPDATECP允许系统使用fMode参数SetTextAlign功能和更新当前位置每次应用程序调用一个指定的设备上下文ExtTextOut。当此标志设置,系统将忽略X和在后续ExtTextOut调用y参数。
为了ExtTextOut的lpDx阵列的ANSI版本的int值的数目和在lpString字节。对于DBCS字符,您可以分摊之间的前导字节和低位字节的lpDx项霉素,只要两个字节总结7.768所需霉素。对于在ExtTextOut Unicode版本,每个Unicode字型DBCS字符得到一个pdx项。
请注意,从GetTextExtentExPoint的alpDx值不相同,ExtTextOut的lpDx值。要使用lpDx的alpDx值,您必须先进程。
实例
有关示例,请参阅“使用菜单设置字体的菜单项文本字符串”。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode和ANSI namesExtTextOutW(Unicode)和ExtTextOutA(ANSI)的
参见
字体和文字概述
字体和文本函数
GetTextAlign
RECT
SetBkColor
SelectObject
SetTextAlign
SetTextColor
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==ExtTextOut Function
The ExtTextOut function draws text using the currently selected font, background color, and text color. You can optionally provide dimensions to be used for clipping, opaquing, or both.
Syntax
BOOL ExtTextOut(
__in HDC hdc,
__in int X,
__in int Y,
__in UINT fuOptions,
__in const RECT *lprc,
__in LPCTSTR lpString,
__in UINT cbCount,
__in const INT *lpDx
);
Parameters
hdc [in]
A handle to the device context.
X [in]
The x-coordinate, in logical coordinates, of the reference point used to position the string.
Y [in]
The y-coordinate, in logical coordinates, of the reference point used to position the string.
fuOptions [in]
Specifies how to use the application-defined rectangle. This parameter can be one or more of the following values.
ValueMeaning
ETO_CLIPPEDThe text will be clipped to the rectangle.
ETO_GLYPH_INDEXThe lpString array refers to an array returned from GetCharacterPlacement and should be parsed directly by GDI as no further language-specific processing is required. Glyph indexing only applies to TrueType fonts, but the flag can be used for bitmap and vector fonts to indicate that no further language processing is necessary and GDI should process the string directly. Note that all glyph indexes are 16-bit values even though the string is assumed to be an array of 8-bit values for raster fonts.
For ExtTextOutW, the glyph indexes are saved to a metafile. However, to display the correct characters the metafile must be played back using the same font. For ExtTextOutA, the glyph indexes are not saved.
ETO_IGNORELANGUAGEReserved for system use. If an application sets this flag, it loses international scripting support and in some cases it may display no text at all.
ETO_NUMERICSLATINTo display numbers, use European digits.
ETO_NUMERICSLOCALTo display numbers, use digits appropriate to the locale.
ETO_OPAQUEThe current background color should be used to fill the rectangle.
ETO_PDYWhen this is set, the array pointed to by lpDx contains pairs of values. The first value of each pair is, as usual, the distance between origins of adjacent character cells, but the second value is the displacement along the vertical direction of the font.
ETO_RTLREADINGMiddle East language edition of Windows: If this value is specified and a Hebrew or Arabic font is selected into the device context, the string is output using right-to-left reading order. If this value is not specified, the string is output in left-to-right order. The same effect can be achieved by setting the TA_RTLREADING value in SetTextAlign . This value is preserved for backward compatibility.

The ETO_GLYPH_INDEX and ETO_RTLREADING values cannot be used together. Because ETO_GLYPH_INDEX implies that all language processing has been completed, the function ignores the ETO_RTLREADING flag if also specified.
lprc [in]
A pointer to an optional RECT structure that specifies the dimensions, in logical coordinates, of a rectangle that is used for clipping, opaquing, or both.
lpString [in]
A pointer to a string that specifies the text to be drawn. The string does not need to be zero-terminated, since cbCount specifies the length of the string.
cbCount [in]
The length of the string pointed to by lpString.
This value may not exceed 8192.
lpDx [in]
A pointer to an optional array of values that indicate the distance between origins of adjacent character cells. For example, lpDx[i] logical units separate the origins of character cell i and character cell i + 1.
Return Value
If the string is drawn, the return value is nonzero. However, if the ANSI version of ExtTextOut is called with ETO_GLYPH_INDEX, the function returns TRUE even though the function does nothing.
If the function fails, the return value is zero.
Remarks
The current text-alignment settings for the specified device context determine how the reference point is used to position the text. The text-alignment settings are retrieved by calling the GetTextAlign function. The text-alignment settings are altered by calling the SetTextAlign function.
If the lpDx parameter is NULL, the ExtTextOut function uses the default spacing between characters. The character-cell origins and the contents of the array pointed to by the lpDx parameter are specified in logical units. A character-cell origin is defined as the upper-left corner of the character cell.
By default, the current position is not used or updated by this function. However, an application can call the SetTextAlign function with the fMode parameter set to TA_UPDATECP to permit the system to use and update the current position each time the application calls ExtTextOut for a specified device context. When this flag is set, the system ignores the X and Y parameters on subsequent ExtTextOut calls.
For the ANSI version of ExtTextOut, the lpDx array has the same number of INT values as there are bytes in lpString. For DBCS characters, you can apportion the dx in the lpDx entries between the lead byte and the trail byte, as long as the sum of the two bytes adds up to the desired dx. For DBCS characters with the Unicode version of ExtTextOut, each Unicode glyph gets a single pdx entry.
Note, the alpDx values from GetTextExtentExPoint are not the same as the lpDx values for ExtTextOut. To use the alpDx values in lpDx, you must first process them.
Examples
For an example, see "Setting Fonts for Menu-Item Text Strings" in Using Menus .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode and ANSI namesExtTextOutW (Unicode) and ExtTextOutA (ANSI)
See Also
Fonts and Text Overview
Font and Text Functions
GetTextAlign
RECT
SetBkColor
SelectObject
SetTextAlign
SetTextColor
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd162713(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:27:19