WinXScroll_SetRange


WinXScroll_SetRange (hWnd, direction, min, max)

Sets the range of scrolling for a scrollbar assosiated with a particular window

Parameter Description
hWnd The handle to the window the scrollbar belongs to
direction The direction of the scrollbar, see remarks for more info
min The minimum scrolling position (usually 0)
max The maximum scrolling position

Returns

$$TRUE on success or $$FALSE on fail.

Remarks

The direction parameter identifies the scrollbar to set the range for. Possible values are:

$$DIR_HORIZ
The horizontal scrollbar
$$DIR_VERT
The vertical scrollbar

The scrolling range isn't in any particular unit. You can use whatever kind of range makes sense for your application. For example, a paint program might measure the range in pixels whereas a word processor might measure it in points. The size of the unit relative to the pixel is set with the WinXScroll_SetPage function.

Examples

'set the vertical scrolling range from 0 to 100
WinXScroll_SetRange (#hMain, $$DIR_VERT, 0, 100)

Related Links

Scrolling
WinXScroll_Show
WinXScroll_SetPage