This event occurs when the user scrolls a wheelmouse downward or away from the computer screen. The expected behavior from the run-time system is to scroll the grid downwards, that is, to fill in items from the bottom of the grid. The following EVENT-DATA information applies to these wheelmouse events: MSG-PAGED-NEXT-WHEEL, MSG-PAGED-PREV-WHEEL, NTF-PL-NEXT-WHEEL, NTF-PL-PREV-WHEEL.
EVENT-DATA 1 value indicates if one or more of the virtual keys have been pressed (activated) at the time the scroll took place, for example, scrolling while pressing a key.
Value | Definition |
---|---|
0 | No virtual key pressed. |
1 | Left mouse button is pressed (MK_LBUTTON). |
2 | Right mouse button is pressed (MK_RBUTTON). |
4 | A shift key is pressed (MK_SHIFT). |
8 | Control key is pressed (MK_CONTROL). |
16 | First X button is down (Windows 2000 or later) (MK_XBUTTON1). |
32 | Second X button is down (Windows 2000 or later) (MK_XBUTTON2). |
EVENT-DATA-1 values may occur simultanously, for instance, both CONTROL and SHIFT keys may be active at the same time. To test values, use the library function CBL_AND.
Since these values are passed straight through from Windows, any additions made by Microsoft will automatically be made available to the runtime system. Such additions would require you to consult Microsoft documentation on WM_MOUSEWHEEL and wParam to determine what is being passed to the low order of the wParam.
EVENT-DATA-2 contains the number of lines to scroll, as set in the operating system's SPI_GETWHEELSCROLLLINES, and is inquired by using the API function SystemParametersInfo.
The value of EVENT-DATA-2 represents the suggested standard number of lines to scroll (typically three lines), as set and determined by the operating system. Although you are free to change it, consider leaving it as is, because it comes from the operating system and is most likely what the user desires.
Because the number of wheelmouse scroll lines can be changed by users, EVENT-DATA-2 is automatically notified and updated of any scroll line number changes via the runtime system. This behavior cannot be disabled, because it is meant to comply with Windows standards. The run-time system will use the detected scroll line number for all applications, as the value returned is used for each event controlled by the runtime system.
Be aware that not only can users configure the number of lines to scroll, they can also change to scrolling a page at a time. If this is the case, EVENT-DATA-2 will return the following value:
78 WHEEL-PAGESCROLL VALUE 4294967265.
You should test EVENT-DATA-2 against this value, and if matching, scroll a page rather than lines.