The TBM_SETRANGE message sets the range of minimum and maximum logical positions for the slider in a trackbar.
TBM_SETRANGE wParam = (WPARAM) (BOOL) fRedraw; lParam = (LPARAM) MAKELONG(lMinimum, lMaximum);
No return value.
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.