网站首页  词典首页

请输入您要查询的函数:

 

术语 setsyscolors
释义 SetSysColors
语法:
C++
BOOL WINAPI SetSysColors(
__in int cElements,
__in const INT *lpaElements,
__in const COLORREF *lpaRgbValues
);
SetSysColors功能
设置为指定的显示元素的颜色。显示元素是一个窗口的各个部分,并出现显示系统上的显示屏幕。
参数
cElements [in]
在展出的lpaElements数组元素的个数。
lpaElements [in]
对一个整数数组指针,指定显示内容改变。如需显示元素的列表,请参见GetSysColor。
lpaRgbValues [in]
一个一个COLORREF值的数组的指针包含在数组中的显示元素的新红,绿,蓝(RGB)颜色值指向的lpaElements参数。
要生成COLORREF,使用RGB宏。
返回值
如果函数成功,返回值是一个非零值。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
函数的SetSysColors WM_SYSCOLORCHANGE消息发送给所有的窗口,通知他们在颜色的变化。它也将指示系统重新绘制所有当前可见的窗口受影响的部分。
最好是尊重颜色由用户指定的设置。如果您正在编写的应用程序,使用户能够改变颜色,那么它适合使用此功能。但是,此功能只影响当前会话。新的颜色不保存当系统终止。
实例
有关示例,请参阅更改窗口元素的颜色。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinuser.h(头文件:winuser.h)
LibraryUser32.lib
DLLUser32.dll
参见
GetSysColor
COLORREF
的RGB
系统信息功能
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==SetSysColors Function
Sets the colors for the specified display elements. Display elements are the various parts of a window and the display that appear on the system display screen.
Syntax
C++
BOOL WINAPI SetSysColors(
__in int cElements,
__in const INT *lpaElements,
__in const COLORREF *lpaRgbValues
);
Parameters
cElements [in]
The number of display elements in the lpaElements array.
lpaElements [in]
A pointer to an array of integers that specify the display elements to be changed. For a list of display elements, see GetSysColor .
lpaRgbValues [in]
A pointer to an array of COLORREF values that contain the new red, green, blue (RGB) color values for the display elements in the array pointed to by the lpaElements parameter.
To generate a COLORREF , use the RGB macro.
Return Value
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
The SetSysColors function sends a WM_SYSCOLORCHANGE message to all windows to inform them of the change in color. It also directs the system to repaint the affected portions of all currently visible windows.
It is best to respect the color settings specified by the user. If you are writing an application to enable the user to change the colors, then it is appropriate to use this function. However, this function affects only the current session. The new colors are not saved when the system terminates.
Examples
For an example, see Changing the Colors of Window Elements .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinuser.h (include Windows.h)
LibraryUser32.lib
DLLUser32.dll
See Also
GetSysColor
COLORREF
RGB
System Information Functions
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms724940(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:24:49