Compartir a través de


UpdateLayeredWindowIndirect function

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

Syntax

BOOL WINAPI UpdateLayeredWindowIndirect(
  _In_       HWND                    hwnd,
  _In_ const UPDATELAYEREDWINDOWINFO *pULWInfo
);

Parameters

  • hwnd [in]
    Type: HWND

    A handle to a layered window. A layered window is created by specifying WS_EX_LAYERED when creating the window with the CreateWindowEx function.

Windows 8: The WS_EX_LAYERED style is supported for top-level windows and child windows. Previous Windows versions support WS_EX_LAYERED only for top-level windows.

  • pULWInfo [in]
    Type: const UPDATELAYEREDWINDOWINFO*

    A pointer to a structure that contains the information for the window.

Return value

Type: ****

Type: BOOL

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

UpdateLayeredWindowIndirect is similar to UpdateLayeredWindow but uses an UPDATELAYEREDWINDOWINFO structure to contain much of the information that is provided to UpdateLayeredWindow through its parameters.

The UpdateLayeredWindowIndirect function maintains the window's appearance on the screen. The windows underneath a layered window do not need to be repainted when they are uncovered due to a call to UpdateLayeredWindowIndirect, because the system will automatically repaint them. This permits seamless animation of the layered window.

UpdateLayeredWindowIndirect always updates the entire window. To update part of a window, use the traditional WM_PAINT and set the blend value using SetLayeredWindowAttributes.

For best drawing performance by the layered window and any underlying windows, the layered window should be as small as possible. An application should also process the message and re-create its layered windows when the display's color depth changes.

For more information, see Layered Windows.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Reference

SetWindowLong

SetWindowPos

UpdateLayeredWindowIndirect

Conceptual

Windows

Other Resources

AlphaBlend

CreateCompatibleBitmap

TransparentBlt