DCompositionAttachMouseDragToHwnd function (dcomp.h)
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 DCompositionAttachMouseDragToHwnd(
[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 |