AFX_GLOBAL_DATA::SetLayeredAttrib

 

Provides a simple way to call the Windows SetLayeredWindowAttributes method.

Syntax

BOOL SetLayeredAttrib(
   HWND hwnd,
   COLORREF crKey,
   BYTE bAlpha,
   DWORD dwFlags
);

Parameters

  • [in] hwnd
    Handle to the layered window.

  • [in] crKey
    The transparency color key that the Desktop Window Manager uses to compose the layered window.

  • [in] bAlpha
    The alpha value that is used to describe the opacity of the layered window.

  • [in] dwFlags
    A bitwise combination (OR) of flags that specify which method parameters to use. Specify LWA_COLORKEY to use the crKey parameter as the transparency color. Specify LWA_ALPHA to use the bAlpha parameter to determine the opacity of the layered window.

Return Value

TRUE if this method succeeds; otherwise, FALSE.

Requirements

Header: afxglobals.h

See Also

AFX_GLOBAL_DATA Structure
Hierarchy Chart
COLORREF
SetLayeredWindowAttributes