网站首页  词典首页

请输入您要查询的函数:

 

术语 graystring
释义 GrayString
语法:
BOOL GrayString(
__in HDC hDC,
__in HBRUSH hBrush,
__in GRAYSTRINGPROC lpOutputFunc,
__in LPARAM lpData,
__in int nCount,
__in int X,
__in int Y,
__in int nWidth,
__in int nHeight
);
GrayString函数
该GrayString函数绘制在指定位置灰色文本。绘制函数复制到内存位图有文,老龄化的位图,然后复制位图到屏幕上。函数格雷斯文字,不管选定的画笔和背景。 GrayString目前使用指定的设备上下文选择的字体。
如果thelpOutputFuncparameter为NULL,GDI的使用TextOut函数,thelpDataparameter被假定为是对字符串指针输出。如果要输出的字符不能处理TextOut(例如,字符串被当作位图存储),应用程序必须提供自己的输出功能。
参数
hDC [in]
一个句柄,设备上下文。
hBrush [in]
句柄刷到为老龄化使用。如果该参数为NULL,文本是灰色同样刷这是用来绘制窗口中的文本。
lpOutputFunc [in]
该申请的指针定义函数,将以此为字符串,或者,如果TextOut是用来绘制字符串,这是一个NULL指针。有关详细信息,请参阅OutputProc回调函数。
lpData [in]
阿数据指针传递给输出功能。如果lpOutputFunc参数为NULL,lpData必须是该字符串指针输出。
nCount [in]
的字符数为输出。如果nCount参数是零,GrayString计算字符串(假设lpData是对字符串指针的长度)。如果nCount为1,功能指向假lpOutputFunc返回时,图像显示,但不是灰色。
X [in]
该装置的X坐标的矩形包围字符串的起始位置。
y [in]
该器件y坐标的矩形包围字符串的起始位置。
nWidth [in]
宽度,设备单位,在矩形包围字符串。如果此参数为0,GrayString计算该地区的宽度,假设lpData是对字符串指针。
nHeight [in]
的高度,在设备的单位,在矩形包围字符串。如果此参数为0,GrayString计算该地区的高度,假设lpData是对字符串指针。
返回值
如果字符串中签后,返回非零值。
如果其中的TextOut函数或应用程序定义的输出函数返回零,或者没有足够的内存来创建一个老龄化内存位图,返回值是零。
备注
不调用GrayString,应用程序可以画灰色字符串设备上支持了坚实的灰色。该系统颜色COLOR_GRAYTEXT是固色灰色系统用于绘制残疾人文本。应用程序可以调用GetSysColor函数来检索COLOR_GRAYTEXT颜色值。如果是其他颜色比0(黑色),应用程序可以调用SetTextColor函数来设置文字颜色的颜色值,然后直接绘制字符串。如果检索到的颜色是黑色,应用程序必须调用GrayString以灰色文本。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinuser.h(头文件:winuser.h)
LibraryUser32.lib
DLLUser32.dll
Unicode和ANSI namesGrayStringW(Unicode)和GrayStringA(ANSI)的
参见
绘画和绘图概述
绘画和绘图功能
DrawText
GetSysColor
OutputProc
SetTextColor
TabbedTextOut
TextOut
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==GrayString Function
The GrayString function draws gray text at the specified location. The function draws the text by copying it into a memory bitmap, graying the bitmap, and then copying the bitmap to the screen. The function grays the text regardless of the selected brush and background. GrayString uses the font currently selected for the specified device context.
If thelpOutputFuncparameter is NULL, GDI uses the TextOut function, and thelpDataparameter is assumed to be a pointer to the character string to be output. If the characters to be output cannot be handled by TextOut (for example, the string is stored as a bitmap), the application must supply its own output function.
Syntax
BOOL GrayString(
__in HDC hDC,
__in HBRUSH hBrush,
__in GRAYSTRINGPROC lpOutputFunc,
__in LPARAM lpData,
__in int nCount,
__in int X,
__in int Y,
__in int nWidth,
__in int nHeight
);
Parameters
hDC [in]
A handle to the device context.
hBrush [in]
A handle to the brush to be used for graying. If this parameter is NULL, the text is grayed with the same brush that was used to draw window text.
lpOutputFunc [in]
A pointer to the application-defined function that will draw the string, or, if TextOut is to be used to draw the string, it is a NULL pointer. For details, see the OutputProc callback function.
lpData [in]
A pointer to data to be passed to the output function. If the lpOutputFunc parameter is NULL, lpData must be a pointer to the string to be output.
nCount [in]
The number of characters to be output. If the nCount parameter is zero, GrayString calculates the length of the string (assuming lpData is a pointer to the string). If nCount is 1 and the function pointed to by lpOutputFunc returns FALSE, the image is shown but not grayed.
X [in]
The device x-coordinate of the starting position of the rectangle that encloses the string.
Y [in]
The device y-coordinate of the starting position of the rectangle that encloses the string.
nWidth [in]
The width, in device units, of the rectangle that encloses the string. If this parameter is zero, GrayString calculates the width of the area, assuming lpData is a pointer to the string.
nHeight [in]
The height, in device units, of the rectangle that encloses the string. If this parameter is zero, GrayString calculates the height of the area, assuming lpData is a pointer to the string.
Return Value
If the string is drawn, the return value is nonzero.
If either the TextOut function or the application-defined output function returned zero, or there was insufficient memory to create a memory bitmap for graying, the return value is zero.
Remarks
Without calling GrayString, an application can draw grayed strings on devices that support a solid gray color. The system color COLOR_GRAYTEXT is the solid-gray system color used to draw disabled text. The application can call the GetSysColor function to retrieve the color value of COLOR_GRAYTEXT. If the color is other than zero (black), the application can call the SetTextColor function to set the text color to the color value and then draw the string directly. If the retrieved color is black, the application must call GrayString to gray the text.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinuser.h (include Windows.h)
LibraryUser32.lib
DLLUser32.dll
Unicode and ANSI namesGrayStringW (Unicode) and GrayStringA (ANSI)
See Also
Painting and Drawing Overview
Painting and Drawing Functions
DrawText
GetSysColor
OutputProc
SetTextColor
TabbedTextOut
TextOut
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd144963(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:18:56