术语 | getlayeredwindowattributes |
释义 | GetLayeredWindowAttributes 语法: BOOL GetLayeredWindowAttributes( HWND hwnd, COLORREF *pcrKey, BYTE *pbAlpha, DWORD *pdwFlags ); GetLayeredWindowAttributes功能 该GetLayeredWindowAttributes函数检索不透明性和透明度的一个分层窗口颜色的关键。 参数 hwnd [in]句柄分层窗口。分层窗口创建时指定WS_EX_LAYERED创建CreateWindowEx函数与窗口或通过SetWindowLong函数设置窗口后,已创建WS_EX_LAYERED。 pcrKey [out]指向一个COLORREF值,接收透明颜色键时使用的分层窗口组成。在这颜色窗口画的所有像素将是透明的。这可以是NULL如果参数是没有必要的。 pbAlpha [out]指向一个字节,它接收阿尔法值用来描述分层窗口透明度。类似的BLENDFUNCTION结构SourceConstantAlpha成员。当变量提及pbAlpha的是0,窗口是完全透明的。当变量提及pbAlpha的是255,窗口是不透明的。这可以是NULL如果参数是没有必要的。 pdwFlags [out]指向一个DWORD,它接收分层标志。这可以是NULL如果参数是没有必要的。分层标志可以是一个或多个下列值。 LWA_ALPHA 使用pbAlpha确定的分层窗口透明度。 LWA_COLORKEY 使用pcrKey颜色的透明度。 返回值 如果函数成功,返回值为非零。 如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。 备注 GetLayeredWindowAttributes可以称为只有在应用程序以前要求窗口SetLayeredWindowAttributes。该函数将失败的分层窗口的设置与UpdateLayeredWindow。 有关详细信息,请参阅使用分层窗口。 功能信息 最低DLL版本 user32.dll 在Winuser.h中HeaderDeclared,头文件:winuser.h import libraryUser32.lib XP的最低经营systemsWindows 参见 视窗概述,使用分层窗口,CreateWindowEx,SetLayeredWindowAttributes,SetWindowLong函数 ==英文原文==GetLayeredWindowAttributes Function The GetLayeredWindowAttributes function retrieves the opacity and transparency color key of a layered window. Syntax BOOL GetLayeredWindowAttributes( HWND hwnd, COLORREF *pcrKey, BYTE *pbAlpha, DWORD *pdwFlags ); 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. pcrKey [out] Pointer to a COLORREF value that receives the transparency color key to be used when composing the layered window. All pixels painted by the window in this color will be transparent. This can be NULL if the argument is not needed. pbAlpha [out] Pointer to a BYTE that receives the Alpha value used to describe the opacity of the layered window. Similar to the SourceConstantAlpha member of the BLENDFUNCTION structure. When the variable referred to by pbAlpha is 0, the window is completely transparent. When the variable referred to by pbAlpha is 255, the window is opaque. This can be NULL if the argument is not needed. pdwFlags [out] Pointer to a DWORD that receives a layering flag. This can be NULL if the argument is not needed. The layering flag can be one or more of the following values. LWA_ALPHA Use pbAlpha to determine the opacity of the layered window. LWA_COLORKEY Use pcrKey as the transparency color. 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 GetLayeredWindowAttributes can be called only if the application has previously called SetLayeredWindowAttributes on the window. The function will fail if the layered window was setup with UpdateLayeredWindow . 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 XP See Also Windows Overview , Using Layered Windows , CreateWindowEx , SetLayeredWindowAttributes , SetWindowLong ==原始网址==http://msdn.microsoft.com/en-us/library/ms633508(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。