Creates a slider control for selecting numeric values.
Takes x (Int), y (Int), width (Int), height (Int), parentWin (Int), and horizonal (Int).
Returns gizmo ID on success, 0 if parent not found.
BGI GUI
Parameters & Returns
Parameters
xInt
yInt
widthInt
heightInt
parentWinInt
horizonalInt
Returns
Int
Quick Summary
Creates a slider control for selecting numeric values.
Takes x (Int), y (Int), width (Int), height (Int), parentWin (Int), and horizonal (Int).
Returns gizmo ID on success, 0 if parent not found.
Technical Exegesis...
Creates a trackbar (slider) control for selecting a value from a range. Searches gizmoMap for parent HWND. Handles scroll panels. Auto-increments gizmoIDCount. Creates using TRACKBAR_CLASS with WS_CHILD | WS_VISIBLE | TBS_AUTOTICKS style. Adds TBS_VERT for vertical orientation if horizonal=0, otherwise horizontal. Initializes with range 0-100 and position 0 (use bgiSetTrackbarRange and bgiSetTrackbarValue to customize). Creates CGizmo with GIZMO_TRACKBAR type, stores position, dimensions, orientation.
Creates a trackbar (slider) control for selecting a value from a range. Searches gizmoMap for parent HWND. Handles scroll panels. Auto-increments gizmoIDCount. Creates using TRACKBAR_CLASS with WS_CHILD | WS_VISIBLE | TBS_AUTOTICKS style. Adds TBS_VERT for vertical orientation if horizonal=0, otherwise horizontal. Initializes with range 0-100 and position 0 (use bgiSetTrackbarRange and bgiSetTrackbarValue to customize). Creates CGizmo with GIZMO_TRACKBAR type, stores position, dimensions, orientation. Returns gizmo ID on success, 0 if parent not found.
Trackbars allow users to drag a slider thumb to select numeric values. Useful for volume controls, zoom levels, opacity, or any continuous value selection. Use bgiSetTrackbarRange to define min/max values. Use bgiGetTrackbarValue to retrieve current position. Use bgiSetTrackbarValue to programmatically set position. Generates BGI_EVENT_COMMAND_UPDATE (WM_HSCROLL/WM_VSCROLL) when user drags slider. Auto-generates tick marks along the track.