The TBM_SETRANGEMAX message sets the maximum logical position for the slider in a trackbar.
TBM_SETRANGEMAX wParam = (WPARAM) fRedraw; lParam = (LPARAM) lMaximum;
No return value.
If the current slider position is greater than the new maximum, the TBM_SETRANGEMAX message sets the slider position to the new maximum value.