Loads a horizontal image strip containing button icons.
Takes toolbarID (Int), imagePath (String), and buttonSize (Int).
Returns 0 if load fails.
BGI GUI
Parameters & Returns
Parameters
toolbarIDInt
imagePathString
buttonSizeInt
Returns
Int
Quick Summary
Loads a horizontal image strip containing button icons.
Takes toolbarID (Int), imagePath (String), and buttonSize (Int).
Returns 0 if load fails.
Technical Exegesis...
Loads a horizontal image strip containing toolbar button icons, dividing it into individual button images. Searches gizmoMap for the toolbar ID. Converts imagePath from UTF-8 to wide string. Loads image with GDI+ Bitmap (supports PNG, JPG, GIF, BMP, TIFF formats). Returns 0 if load fails. Converts GDI+ bitmap to HBITMAP with white background (RGB(255,255,255)) for transparency masking.
Loads a horizontal image strip containing toolbar button icons, dividing it into individual button images. Searches gizmoMap for the toolbar ID. Converts imagePath from UTF-8 to wide string. Loads image with GDI+ Bitmap (supports PNG, JPG, GIF, BMP, TIFF formats). Returns 0 if load fails. Converts GDI+ bitmap to HBITMAP with white background (RGB(255,255,255)) for transparency masking. Creates HIMAGELIST with ImageList_Create using buttonSize for width/height, ILC_COLOR32 | ILC_MASK flags for 32-bit color with transparency. Adds bitmap strip with ImageList_AddMasked using RGB(255,255,255) as transparent color - automatically divides horizontal strip into square icons based on buttonSize. Sends TB_SETIMAGELIST to assign image list to toolbar. Sends TB_SETBUTTONSIZE with buttonSize for both width and height (square buttons). Returns 1 on success, 0 if toolbar not found or image load failed.
This function loads a single horizontal image file containing multiple button icons arranged side-by-side. Image strip is automatically divided into square icons of buttonSize x buttonSize. For example, a 96x32 pixel strip with buttonSize=32 creates 3 icons (96/32=3). White pixels (RGB(255,255,255)) become transparent. Must be called before adding buttons. Icon indices start at 0 (leftmost icon = 0, second icon = 1, etc.). Use PNG format for best transparency support. Common button sizes: 16x16, 24x24, 32x32, 48x48.