网站首页  词典首页

请输入您要查询的函数:

 

术语 setlayeredwindowattributes
释义 SetLayeredWindowAttributes
语法:
BOOL SetLayeredWindowAttributes( HWND hwnd,
COLORREF crKey,
BYTE bAlpha,
DWORD dwFlags
);
SetLayeredWindowAttributes函数
该SetLayeredWindowAttributes函数设置不透明性和透明度的一个分层窗口颜色的关键。
参数
hwnd
[in]句柄分层窗口。分层窗口创建时指定WS_EX_LAYERED创建CreateWindowEx函数与窗口或通过SetWindowLong函数设置窗口后,已创建WS_EX_LAYERED。
crKey
[in] COLORREF结构,指定颜色键的透明度时要使用的分层窗口组成。在这颜色窗口画的所有像素将是透明的。要生成COLORREF,使用RGB宏。
bAlpha
[in]阿尔法值用来描述分层窗口透明度。类似的BLENDFUNCTION结构SourceConstantAlpha成员。当bAlpha为0,窗口是完全透明的。当bAlpha是255,窗口是不透明的。
dwFlags
[in]指定一个要采取的行动。此参数可以是一个或多个下列值。
LWA_COLORKEY
使用crKey颜色的透明度。
LWA_ALPHA
使用bAlpha确定的分层窗口透明度。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
注意,一旦SetLayeredWindowAttributes一直是一个分层的窗口中调用,随后UpdateLayeredWindow调用将失败,直到分层样式位被清除,重新设置。
有关详细信息,请参阅使用分层窗口。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
2000年最低经营systemsWindows
参见
视窗概述,使用分层窗口,AlphaBlend,CreateWindowEx,SetWindowLong函数,TransparentBlt,UpdateLayeredWindow,COLORREF,的RGB
==英文原文==SetLayeredWindowAttributes Function
The SetLayeredWindowAttributes function sets the opacity and transparency color key of a layered window.
Syntax
BOOL SetLayeredWindowAttributes( HWND hwnd,
COLORREF crKey,
BYTE bAlpha,
DWORD dwFlags
);
Parameters
hwnd
[in] Handle to the layered window. A layered window is created by specifying WS_EX_LAYERED when creating the window with the CreateWindowEx function or by setting WS_EX_LAYERED via SetWindowLong after the window has been created.
crKey
[in] COLORREF structure that specifies the transparency color key to be used when composing the layered window. All pixels painted by the window in this color will be transparent. To generate a COLORREF, use the RGB macro.
bAlpha
[in] Alpha value used to describe the opacity of the layered window. Similar to the SourceConstantAlpha member of the BLENDFUNCTION structure. When bAlpha is 0, the window is completely transparent. When bAlpha is 255, the window is opaque.
dwFlags
[in] Specifies an action to take. This parameter can be one or more of the following values.
LWA_COLORKEY
Use crKey as the transparency color.
LWA_ALPHA
Use bAlpha to determine the opacity of the layered window.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
Note that once SetLayeredWindowAttributes has been called for a layered window, subsequent UpdateLayeredWindow calls will fail until the layering style bit is cleared and set again.
For more information, see Using Layered Windows .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 2000
See Also
Windows Overview , Using Layered Windows , AlphaBlend , CreateWindowEx , SetWindowLong , TransparentBlt , UpdateLayeredWindow , COLORREF , RGB
==原始网址==http://msdn.microsoft.com/en-us/library/ms633540(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:21:45