Share via


WM_MOUSEWHEEL

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This message is posted to the window that has the focus when the user presses the mouse wheel. The DefWindowProc function propagates the message to the parent window of the window that has focus. You should not forward the message internally because DefWindowProc propagates the message up the chain of parent windows until DefWindowProc finds a window that processes the message.

A window receives this message through the WindowProc function for the window.

Syntax

WM_MOUSEWHEEL 
    fwKeys = LOWORD(wParam); 
    zDelta = HIWORD(wParam);
    xPos = LOWORD(lParam); 
    yPos = HIWORD(lParam);

Parameters

  • fwKeys
    Indicates the mouse buttons and keys that the user pressed. The following table shows the possible values, which can be combined.

    Value Description

    MK_CONTROL

    The user pressed the CTRL key.

    MK_LBUTTON

    The user pressed the left mouse button.

    MK_MBUTTON

    The user pressed the middle mouse button.

    MK_RBUTTON

    The user pressed the right mouse button.

    MK_SHIFT

    The user pressed the SHIFT key.

  • zDelta
    Indicates that the mouse wheel was pressed, expressed in multiples or divisions of WHEEL_DELTA, which is 120.
  • xPos
    Value of the low-order word of lParam. Specifies the x-coordinate of the pointer, relative to the upper-left corner of the screen.
  • yPos
    Value of the high-order word of lParam. Specifies the y-coordinate of the pointer, relative to the upper-left corner of the screen.

Return Value

An application that processes this message should return zero.

Remarks

None.

Requirements

Header windows.h
Library coredll.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

DefWindowProc
GetSystemMetrics
mouse_event
SystemParametersInfo
WindowProc