DCompositionAttachMouseDragToHwnd function

Creates an Interaction/InputSink to route mouse button down and any subsequent move and up events to the given HWND. There is no move thresholding; when enabled, all events including and following the down are unconditionally redirected to the specified window. After calling this API, the device owning the visual must be committed.

Syntax


HRESULT STDAPI DCompositionAttachMouseWheelToHwnd(
  _In_ IDCompositionVisual *visual,
  _In_ HWND                hwnd,
  _In_ BOOL                enable
);

Parameters

visual [in]

Type: IDCompositionVisual*

The visual to route messages from.

hwnd [in]

Type: HWND

The HWND to route messages to.

enable [in]

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

Header

Dcomp.h

Library

Dcomp.lib

DLL

Dcomp.dll

 

 

Show: