Default Trackbar Message Processing

This section describes the window message processing performed by a trackbar.

Message
Processing performed
WM_CAPTURECHANGED
Kills the timer if one was set during WM_LBUTTONDOWN processing and sends the TB_THUMBPOSITION notification message, if necessary. It always sends the TB_ENDTRACK notification message.
WM_CREATE
Performs additional initialization. It sets the initial tick frequency to 1, the line size to 1, and the page size to pics/WIN3200090000.gif 1.
WM_DESTROY
Frees resources.
WM_ENABLE
Repaints the trackbar window.
WM_ERASEBKGND
Erases the window background, using the current background color for the trackbar.
WM_GETDLGCODE
Returns the DLGC_WANTARROWS value.
WM_KEYDOWN
Processes the direction keys and sends the TB_TOP, TB_BOTTOM, TB_PAGEUP, TB_PAGEDOWN, TB_LINEUP, and TB_LINEDOWN notification messages, as appropriate.
WM_KEYUP
Sends the TB_ENDTRACK notification message if the key was one of the direction keys.
WM_KILLFOCUS
Repaints the trackbar window.
WM_LBUTTONDOWN
Sets the focus and the mouse capture to the trackbar. When necessary, it sets a timer that determines how quickly the slider moves toward the mouse cursor when the user holds down the mouse button in the window.
WM_LBUTTONUP
Releases the mouse capture and kills the timer if one was set during WM_LBUTTONDOWN processing. It sends the TB_THUMBPOSITION notification message, if necessary. It always sends the TB_ENDTRACK notification message.
WM_MOUSEMOVE
Moves the slider and sends the TB_THUMBTRACK notification message when tracking the mouse (see WM_TIMER).
WM_PAINT
Paints the trackbar. If the wParam parameter is non-NULL, the control assumes that the value is an HDC and paints using that device context.
WM_SETFOCUS
Repaints the trackbar window.
WM_SIZE
Sets the dimensions of the trackbar, removing the slider if there is not enough room to display it.
WM_TIMER
Retrieves the mouse position and updates the position of the slider. (It is received only when the user is dragging the slider.)
WM_WININICHANGE
Initializes slider dimensions.

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples