DCompositionAttachMouseWheelToHwnd function (dcomp.h)

Creates an Interaction/InputSink to route mouse wheel messages to the given HWND. This will fail if there is already an interaction attached to this visual. After calling this API, the device that owns the visual must be committed.

Syntax

HRESULT DCompositionAttachMouseWheelToHwnd(
  [in] IDCompositionVisual *visual,
  [in] HWND                hwnd,
  [in] BOOL                enable
);

Parameters

[in] visual

Type: IDCompositionVisual*

The visual to route messages from.

[in] hwnd

Type: HWND

The HWND to route messages to.

[in] enable

Type: BOOL

Boolean value indicating whether to enable or disable routing.

Return value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Target Platform Windows
Header dcomp.h
Library Dcomp.lib
DLL Dcomp.dll