CTrackbar.SetRangemethod
Sets the range of minimum and maximum logical positions for the slider in a trackbar.
Syntax
SUB SetRange (BYVAL hTrackbar AS HWND, BYVAL lMinimum AS LONG, BYVAL lMaximum AS LONG, BYVAL fRedraw AS BOOLEAN = FALSE)
Parameters
| Name | Description | |
|---|---|---|
hTrackbar | Handle to the trackbar control. | |
lMinimum | Redraw flag. If this parameter is TRUE, the trackbar is redrawn after the range is set. If this parameter is FALSE, the message sets the range but does not redraw the trackbar. | |
fRedraw | The LOWORD specifies the minimum position for the slider, and the HIWORD specifies the maximum position. |
Description
Sets the range of minimum and maximum logical positions for the slider in a trackbar.
Remarks
If the current slider position is outside the new range, the TBM_SETRANGE message sets the slider position to the new maximum or minimum value.
Because this message takes two 16-bit unsigned integer values, the maximum range that this message can specify is from 0 to 65,535. To specify larger range values, use the TBM_SETRANGEMIN and TBM_SETRANGEMAX messages.
Reference
- Include file
CTrackbar.inc - Defined in AfxNova/CTrackbar.inc:329
- Documented in Windows/WIndows Controls/CTrackbar Class.md
- Topic: CTrackbar Class