4. Scroll Bar Range & Position

The scroll bar range is a pair of integers representing a minimum and maximum value associated with the scroll bar. The position is the location of the thumb within the range.

By default, the range of a scroll bar is 0 through 100, but it can be changed to a more convenient range for the program:

SetScrollRange (hwnd, iBar, iMin, iMax, bRedraw);

hwnd:

Handle to the window

iBar:

Either SB_VERT or SB_HORZ

iMin:

Minimum value to set

iMax:

Maximum value to set

bRedraw:

true, to redraw the scroll bar based on new range, or false

 

Prev | Home | Next

Joseph Maratt | CS561 | 4.4.2004