CWnd::GetLayeredWindowAttributes

Retrieves the opacity and transparency color key of a layered window.

BOOL GetLayeredWindowAttributes( 
   COLORREF *pcrKey, 
   BYTE *pbAlpha, 
   DWORD *pdwFlags 
) const;

Parameters

  • pcrKey
    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
    Pointer to a BYTE that receives the Alpha value used to describe the opacity of the layered window. 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
    Pointer to a DWORD that receives a layering flag. This can be NULL if the argument is not needed. For a complete list of possible values, see GetLayeredWindowAttributes.

Return Value

Nonzero if the function succeeds; otherwise 0.

Remarks

This member function emulates the functionality of the function GetLayeredWindowAttributes, as described in the Windows SDK.

Requirements

Header: afxwin.h

See Also

Reference

CWnd Class

Hierarchy Chart