void GetScrollRange(hWnd,nBar,lpMinPos,lpMaxPos)
This function copies the current minimum and maximum scroll-bar positions for the given scroll bar to the locations specified by the lpMinPos and lpMaxPos parameters. If the given window does not have standard scroll bars or is not a scroll-bar control, then the GetScrollRange function copies zero to lpMinPos and lpMaxPos.
Parameter | Type/Description |
hWnd | HWND Identifies a window that has standard scroll bars or a scroll-bar control, depending on the value of the nBar parameter. | ||
nBar | int Specifies an integer value that identifies which scroll bar to retrieve. It can be one of the following values: | ||
Value | Meaning | ||
SB_CTL | Retrieves the position of a scroll-bar control; in this case, the hWnd parameter must be the handle of a scroll-bar control. | ||
SB_HORZ | Retrieves the position of a window's horizontal scroll bar. | ||
SB_VERT | Retrieves the position of a window's vertical scroll bar. | ||
lpMinPos | LPINT Points to the integer variable that is to receive the minimum position. | ||
lpMaxPos | LPINT Points to the integer variable that is to receive the maximum position. |
None.
The default range for a standard scroll bar is 0 to 100. The default range for a scroll-bar control is empty (both values are zero).