Επεξεργασία

Κοινή χρήση μέσω


WM_POINTERHWHEEL message

Posted to the window with foreground keyboard focus when a horizontal scroll wheel is rotated.

A window receives this message through its WindowProc function.

![Important]
Desktop apps should be DPI aware. If your app is not DPI aware, screen coordinates contained in pointer messages and related structures might appear inaccurate due to DPI virtualization. DPI virtualization provides automatic scaling support to applications that are not DPI aware and is active by default (users can turn it off). For more information, see Writing High-DPI Win32 Applications.

#define WM_POINTERHWHEEL            0x024F

Parameters

wParam

Contains the pointer identifier and wheel delta. Use the following macros to retrieve this information.

GET_POINTERID_WPARAM(wParam): pointer identifier.

GET_WHEEL_DELTA_WPARAM(wParam): wheel delta as signed short value.

lParam

Contains the point location of the pointer.

Note

Because the pointer may make contact with the device over a non-trivial area, this point location may be a simplification of a more complex pointer area. Whenever possible, an application should use the complete pointer area information instead of the point location.

Use the following macros to retrieve the physical screen coordinates of the point.

Return value

If the application processes this message, it should return zero.

If the application does not process this message, it should call DefWindowProc.

Remarks

To retrieve the wheel scroll units, use the inputData filed of the POINTER_INFO structure returned by calling GetPointerInfo function. This field contains a signed value and is expressed in a multiple of WHEEL_DELTA. A positive value indicates a rotation forward and a negative value indicates a rotation backward.

Note that the wheel inputs may be delivered even if the mouse cursor is located outside of application s window. The wheel messages are delivered in a way very similar to the keyboard inputs. The focus window of the foregournd message queue receives the wheel messages.

Requirements

Requirement Value
Minimum supported client
Windows 8 [desktop apps only]
Minimum supported server
Windows Server 2012 [desktop apps only]
Header
Winuser.h (include Windows.h)

See also

Messages