Sets the position and size of a gizmo control.
Takes gizmo (Int), newX (Int), newY (Int), newWidth (Int), and newHeight (Int).
Returns 1 on success, 0 if gizmo not found or MoveWindow failed.
BGI GUI
Parameters & Returns
Parameters
gizmoInt
newXInt
newYInt
newWidthInt
newHeightInt
Returns
Int
Quick Summary
Sets the position and size of a gizmo control.
Takes gizmo (Int), newX (Int), newY (Int), newWidth (Int), and newHeight (Int).
Returns 1 on success, 0 if gizmo not found or MoveWindow failed.
Technical Exegesis...
Sets the position and size of a gizmo (control) with new X, Y, width, and height values. Searches gizmoMap for the gizmo ID. Calls MoveWindow with new coordinates and dimensions, TRUE for repaint. If successful, updates stored position (x, y, width, height) in CGizmo structure. Sends InvalidateRect with NULL (entire client area) and TRUE (erase background) to force redraw. Calls UpdateWindow to immediately repaint. Returns 1 on success, 0 if gizmo not found or MoveWindow failed.
Sets the position and size of a gizmo (control) with new X, Y, width, and height values. Searches gizmoMap for the gizmo ID. Calls MoveWindow with new coordinates and dimensions, TRUE for repaint. If successful, updates stored position (x, y, width, height) in CGizmo structure. Sends InvalidateRect with NULL (entire client area) and TRUE (erase background) to force redraw. Calls UpdateWindow to immediately repaint. Returns 1 on success, 0 if gizmo not found or MoveWindow failed.
This function repositions and resizes a control. All parameters are in pixels. X and Y are relative to parent window's client area. InvalidateRect and UpdateWindow ensure static controls (labels) repaint correctly after resizing. Use for dynamic layouts, responsive interfaces, or runtime position changes. Can move and resize simultaneously. Works with all gizmo types (buttons, textboxes, panels, etc.). Repaint is immediate (TRUE parameter in MoveWindow).