Creates a button with a bitmap image.
Takes bmpFilepath (String), x (Int), y (Int), width (Int), height (Int), and parentWin (Int).
Returns gizmo ID on success, 0 on failure (parent not found or image load error).
BGI GUI
Parameters & Returns
Parameters
bmpFilepathString
xInt
yInt
widthInt
heightInt
parentWinInt
Returns
Int
Quick Summary
Creates a button with a bitmap image.
Takes bmpFilepath (String), x (Int), y (Int), width (Int), height (Int), and parentWin (Int).
Returns gizmo ID on success, 0 on failure (parent not found or image load error).
Technical Exegesis...
Creates a button displaying a bitmap image instead of text. Loads bitmap from file using GDI+ (supports PNG, JPG, BMP, GIF). Searches gizmoMap for parent HWND. Handles scroll panels. Auto-increments gizmoIDCount. Creates button with BS_BITMAP style instead of BS_PUSHBUTTON. Loads image with LoadImageFromFile (GDI+), converts to HBITMAP, sends to button with BM_SETIMAGE. Creates CGizmo with GIZMO_BUTTON type. Returns gizmo ID on success, 0 on failure (parent not found or image load error).
Creates a button displaying a bitmap image instead of text. Loads bitmap from file using GDI+ (supports PNG, JPG, BMP, GIF). Searches gizmoMap for parent HWND. Handles scroll panels. Auto-increments gizmoIDCount. Creates button with BS_BITMAP style instead of BS_PUSHBUTTON. Loads image with LoadImageFromFile (GDI+), converts to HBITMAP, sends to button with BM_SETIMAGE. Creates CGizmo with GIZMO_BUTTON type. Returns gizmo ID on success, 0 on failure (parent not found or image load error).
Bitmap buttons work like regular buttons but display an image. The image is scaled to fit the button dimensions. Generates BGI_EVENT_COMMAND_CLICK when clicked. Supports transparency in PNG images. Image file path can be absolute or relative. Use same functions as regular buttons (bgiSetGizmoVisibility, etc.).