An application sends the SBM_GETRANGE message to a scroll bar control to retrieve the minimum and maximum position values for the control.
SBM_GETRANGE wParam = (WPARAM) (LPINT) lpnMinPos; // minimum position lParam = (LPARAM) (LPINT) lpnMaxPos; // maximum position
This message does not return a value.