Skip to content

winrt.windows.ui.composition.interop module

APIs for desktop interop with the Windows.UI.Composition namespace.

create_desktop_window_target

create_desktop_window_target(compositor, hwnd_target, *, is_topmost=False)

Creates a visual layer on a window to host Composition content.

Parameter Type Description
compositor winrt.windows.ui.composition.Compositor The Compositor object that is used to create the DesktopWindowTarget.
hwnd_target int The window handle (HWND) that the visual layer will be attached to.
is_topmost bool Whether the visual layer is above the window's child windows rather than below them.

Returns: The created DesktopWindowTarget.

Return type: winrt.windows.ui.composition.desktop.DesktopWindowTarget

Raises: OSError on failure

Added in version 2.2