Scroll Bar Requests
The user makes scrolling requests by clicking various parts of a scroll bar. Windows sends the request to the given window in the form of a WM_HSCROLL or WM_VSCROLL message. A horizontal scroll bar sends the WM_HSCROLL message; a vertical scroll bar sends the WM_VSCROLL message. Each message includes a notification code that corresponds to the user's action, to the handle of the scroll bar (scroll bar controls only), and, in some cases, to the position of the scroll box. The following figure shows the notification messages that the user generates when clicking various parts of a scroll bar.
Notification
message |
Action |
Response |
SB_LINEUP
| The user clicks the top scroll arrow.
| Decrements the scroll box position; scrolls toward the top of the data by one
unit.
|
SB_LINEDOWN
| The user clicks the bottom scroll arrow.
| Increments the scroll box position; scrolls toward the bottom of the data by
one unit.
|
SB_LINELEFT
| The user clicks the left scroll arrow.
| Decrements the scroll box position; scrolls toward the left end of the data by
one unit.
|
SB_LINERIGHT
| The user clicks the right scroll arrow.
| Increments the scroll box position; scrolls toward the right end of the data
by one unit.
|
SB_PAGEUP
| The user clicks the scroll bar shaft above the scroll box.
| Decrements the scroll box position by the number of data units in the window;
scrolls toward the top of the data by the same number of units.
|
SB_PAGEDOWN
| The user clicks the scroll bar shaft below the scroll box.
| Increments the scroll box position by the number of data units in the window;
scrolls toward the bottom of the data by the same number of units.
|
SB_PAGELEFT
| The user clicks the scroll bar shaft to the left of the scroll box.
| Decrements the scroll box position by the number of data units in the window;
scrolls toward the left end of the data by the same number of units.
|
SB_PAGERIGHT
| The user clicks the scroll bar shaft to the right of the scroll box.
| Increments the scroll box position by the number of data units in the window;
scrolls toward the right end of the data by the same number of units.
|
SB_THUMBPOSITION
| The user releases the scroll box after dragging it.
| Sets the scroll box to the position given in the message; scrolls the data by
the same number of units the scroll box has moved.
|
SB_THUMBTRACK
| The user drags the scroll box.
| Sets the scroll box to the position given in the message and scrolls the data
by the same number of units the scroll box has moved for applications that draw
data quickly. Applications that cannot draw data quickly must wait for the
SB_THUMBPOSITION message before moving the scroll box and scrolling the data.
|
SB_ENDSCROLL
| The user releases the mouse after holding it on an arrow or in the scroll bar
shaft.
| No response is needed.
|
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers - More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples