UPDATELAYEREDWINDOWINFO structure (winuser.h)

Used by UpdateLayeredWindowIndirect to provide position, size, shape, content, and translucency information for a layered window.

Syntax

typedef struct tagUPDATELAYEREDWINDOWINFO {
  DWORD               cbSize;
  HDC                 hdcDst;
  const POINT         *pptDst;
  const SIZE          *psize;
  HDC                 hdcSrc;
  const POINT         *pptSrc;
  COLORREF            crKey;
  const BLENDFUNCTION *pblend;
  DWORD               dwFlags;
  const RECT          *prcDirty;
} UPDATELAYEREDWINDOWINFO, *PUPDATELAYEREDWINDOWINFO;

Members

cbSize

Type: DWORD

The size, in bytes, of this structure.

hdcDst

Type: HDC

A handle to a DC for the screen. This handle is obtained by specifying NULL in this member when calling UpdateLayeredWindowIndirect. The handle is used for palette color matching when the window contents are updated. If hdcDst is NULL, the default palette is used.

If hdcSrc is NULL, hdcDst must be NULL.

pptDst

Type: const POINT*

The new screen position of the layered window. If the new position is unchanged from the current position, pptDst can be NULL.

psize

Type: const SIZE*

The new size of the layered window. If the size of the window will not change, this parameter can be NULL. If hdcSrc is NULL, psize must be NULL.

hdcSrc

Type: HDC

A handle to the DC for the surface that defines the layered window. This handle can be obtained by calling the CreateCompatibleDC function. If the shape and visual context of the window will not change, hdcSrc can be NULL.

pptSrc

Type: const POINT*

The location of the layer in the device context. If hdcSrc is NULL, pptSrc should be NULL.

crKey

Type: COLORREF

The color key to be used when composing the layered window. To generate a COLORREF, use the RGB macro.

pblend

Type: const BLENDFUNCTION*

The transparency value to be used when composing the layered window.

dwFlags

Type: DWORD

This parameter can be one of the following values.

Value Meaning
ULW_ALPHA
0x00000002
Use pblend as the blend function. If the display mode is 256 colors or less, the effect of this value is the same as the effect of ULW_OPAQUE.
ULW_COLORKEY
0x00000001
Use crKey as the transparency color.
ULW_OPAQUE
0x00000004
Draw an opaque layered window.
ULW_EX_NORESIZE
0x00000008
Force the UpdateLayeredWindowIndirect function to fail if the current window size does not match the size specified in the psize.
 

If hdcSrc is NULL, dwFlags should be zero.

prcDirty

Type: const RECT*

The area to be updated. This parameter can be NULL. If it is non-NULL, only the area in this rectangle is updated from the source DC.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Header winuser.h (include Windows.h)

See also

Conceptual

Reference

UpdateLayeredWindow

Window Features