Поделиться через


CWnd::SetLayeredWindowAttributes

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

BOOL SetLayeredWindowAttributes(
   COLORREF crKey,
   BYTE bAlpha,
   DWORD dwFlags
);

Параметры

  • crKey
    Pointer to a COLORREF value 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
    Alpha value used to describe the opacity of the layered window. For more information, see 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
    Specifies an action to take. This parameter can be one or more of the following values. For a list of possible values, seeSetLayeredWindowAttributes.

Возвращаемое значение

Nonzero if the function succeeds; otherwise 0.

Заметки

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

Требования

Header: afxwin.h

См. также

Основные понятия

CWnd Class

CWnd Members

Hierarchy Chart

CWnd::UpdateLayeredWindow