CWnd::UpdateLayeredWindow

Updates the position, size, shape, content, and translucency of a layered window.

BOOL UpdateLayeredWindow(
   CDC* pDCDst,
   POINT *pptDst,
   SIZE *psize,
   CDC *pDCSrc,
   POINT *pptSrc,
   COLORREF crKey,
   BLENDFUNCTION *pblend,
   DWORD dwFlags
);

Parameters

  • pDCDst
    A pointer to a device context for the screen. It is used for palette color matching when the window contents are updated. If pDCDst is NULL, the default palette will be used.

    If pDCSrc is NULL, pDCDst must be NULL.

  • pptDst
    A pointer to a POINT structure specifying the new screen position of the layered window. If the current position is not changing, pptDst can be NULL.

  • psize
    Pointer to a SIZE structure that specifies the new size of the layered window. If the size of the window is not changing, psize can be NULL.

    If pDCSrc is NULL, psize must be NULL.

  • pDCSrc
    A pointer to a DC for the surface that defines the layered window. If the shape and visual context of the window are not changing, pDCSrc can be NULL.

  • pptSrc
    Pointer to a POINT structure that specifies the location of the layer in the device context.

    If pDCSrc is NULL, pptSrc should be NULL.

  • 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.

  • pblend
    Pointer to a BLENDFUNCTION structure that specifies the transparency value to be used when composing the layered window.

  • dwFlags
    Specifies an action to take. This parameter can be one or more of the following values. For a list of possible values, seeUpdateLayeredWindow.

Return Value

Nonzero if the function succeeds; otherwise 0.

Remarks

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

Requirements

Header: afxwin.h

See Also

Reference

CWnd Class

Hierarchy Chart

CWnd::SetLayeredWindowAttributes

Concepts

CWnd Members