Trackbar Notification Messages
A trackbar notifies its parent window of user actions by sending the parent
WM_HSCROLL or
WM_VSCROLL messages. A trackbar with the TBS_HORZ style sends WM_HSCROLL messages. A
trackbar with the TBS_VERT style sends WM_VSCROLL messages. The low-order word of
the
wParam parameter of WM_HSCROLL or WM_VSCROLL contains the notification code, and the
high-order word specifies the position of the slider. The
lParam parameter is the handle of the trackbar.
The system sends the TB_BOTTOM, TB_LINEDOWN, TB_LINEUP, and TB_TOP
notification messages only when the user interacts with a trackbar by using the keyboard.
The TB_THUMBPOSITION and TB_THUMBTRACK notification messages are only sent when
the user is using the mouse. The TB_ENDTRACK, TB_PAGEDOWN, and TB_PAGEUP
notification messages are sent in both cases. The following table lists the trackbar
notification messages and the events (virtual-key codes or mouse events) that
cause the notifications to be sent.
Notification message
| Reason sent
|
TB_BOTTOM
| VK_END
|
TB_ENDTRACK
| WM_KEYUP (the user released a key that sent a relevant virtual-key code)
|
TB_LINEDOWN
| VK_RIGHT or VK_DOWN
|
TB_LINEUP
| VK_LEFT or VK_UP
|
TB_PAGEDOWN
| VK_NEXT (the user clicked the channel below or to the right of the slider)
|
TB_PAGEUP
| VK_PRIOR (the user clicked the channel above or to the left of the slider)
|
TB_THUMBPOSITION
| WM_LBUTTONUP following a TB_THUMBTRACK notification message
|
TB_THUMBTRACK
| Slider movement (the user dragged the slider)
|
TB_TOP
| VK_HOME
|
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers
- More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples