Updates the minimum and maximum range values of a scrollbar control.
Takes scrollbarID (Int), min (Int), and max (Int).
Returns nothing.
BGI GUI
Parameters & Returns
Parameters
scrollbarIDInt
minInt
maxInt
Returns
Void
Quick Summary
Updates the minimum and maximum range values of a scrollbar control.
Takes scrollbarID (Int), min (Int), and max (Int).
Returns nothing.
Technical Exegesis...
Updates the minimum and maximum range values of a scrollbar control. Searches gizmoMap for scrollbarID. If found, gets CustomScrollbarData* via GetWindowLongPtr(GWLP_USERDATA). Sets data->minVal=min and data->maxVal=max. Clamps current position to new range: if currentPos < minVal, sets to minVal; if currentPos > maxVal, sets to maxVal. Calls InvalidateRect to trigger scrollbar redraw. No return value.
This function changes the scrollbar's value range after creation.
Updates the minimum and maximum range values of a scrollbar control. Searches gizmoMap for scrollbarID. If found, gets CustomScrollbarData* via GetWindowLongPtr(GWLP_USERDATA). Sets data->minVal=min and data->maxVal=max. Clamps current position to new range: if currentPos < minVal, sets to minVal; if currentPos > maxVal, sets to maxVal. Calls InvalidateRect to trigger scrollbar redraw. No return value.
This function changes the scrollbar's value range after creation. Automatic clamping adjusts currentPos if it falls outside new range. InvalidateRect updates visual appearance (scrollbar thumb size may change based on range). pageSize unchanged - may want to call bgiSetScrollbarPageSize afterward to adjust proportionally. Use when content size changes dynamically (e.g., resizable text area, zoom levels). Works with both vertical and horizontal scrollbars. Common pattern: content size changes, calculate new range, call bgiSetScrollbarRange, optionally update pageSize.