Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
MFC
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CWnd::GetLayeredWindowAttributes

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

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

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.

Nonzero if the function succeeds; otherwise 0.

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

Header: afxwin.h

Community Additions

ADD
Show:
© 2015 Microsoft