Creates a custom vertical scrollbar control with specified range.
Takes x (Int), y (Int), width (Int), height (Int), parent (Int), min (Int), and max (Int).
Returns gizmo ID, or 0 if parent not found or creation failed.
BGI GUI
Parameters & Returns
Parameters
xInt
yInt
widthInt
heightInt
parentInt
minInt
maxInt
Returns
Int
Quick Summary
Creates a custom vertical scrollbar control with specified range.
Takes x (Int), y (Int), width (Int), height (Int), parent (Int), min (Int), and max (Int).
Returns gizmo ID, or 0 if parent not found or creation failed.
Technical Exegesis...
Creates a custom vertical scrollbar control with specified range. Searches gizmoMap for parent window ID. Increments gizmoIDCount for unique ID. Uses GetActualParentHWND for scroll panel support. Gets HINSTANCE from parent or fallbacks to BambooRuntime.dll/current module. Calls RegisterCustomScrollbarClass() to register "CUSTOM_SCROLLBAR" window class. Creates window with WS_VISIBLE | WS_CHILD.
Creates a custom vertical scrollbar control with specified range. Searches gizmoMap for parent window ID. Increments gizmoIDCount for unique ID. Uses GetActualParentHWND for scroll panel support. Gets HINSTANCE from parent or fallbacks to BambooRuntime.dll/current module. Calls RegisterCustomScrollbarClass() to register "CUSTOM_SCROLLBAR" window class. Creates window with WS_VISIBLE | WS_CHILD. Gets CustomScrollbarData* via GWLP_USERDATA, sets minVal=min, maxVal=max, currentPos=min, pageSize=(max-min)/10, isVertical=true. Calls InvalidateRect to trigger redraw. Creates CGizmo with GIZMO_VSCROLLBAR type, adds to gizmoMap. Returns gizmo ID, or 0 if parent not found or creation failed.
This function creates a custom-drawn vertical scrollbar (not Windows standard scrollbar). RegisterCustomScrollbarClass registers custom window class with owner-draw procedures. CustomScrollbarData structure stores scrollbar state (min/max range, current position, page size, orientation). Initial position is min value. Default pageSize is 10% of range (max-min)/10. InvalidateRect triggers WM_PAINT for custom drawing. Fires BGI_EVENT_COMMAND_UPDATE with BGI_EVENT_ID_VSCROLLBAR when position changes via user interaction. Use bgiGetScrollbarPos/bgiSetScrollbarPos to query/update position. Use bgiSetScrollbarRange/bgiSetScrollbarPageSize to modify behavior.