Displays a customizable message box with selectable button and icon types.
Takes message (String), title (String), buttons (Int), icon (Int), and window (Int).
Returns 1 for OK/Yes (IDOK/IDYES), 0 for Cancel/No (IDCANCEL/IDNO), -1 for other (default/X button).
BGI GUI
Parameters & Returns
Parameters
messageString
titleString
buttonsInt
iconInt
windowInt
Returns
Int
Quick Summary
Displays a customizable message box with selectable button and icon types.
Takes message (String), title (String), buttons (Int), icon (Int), and window (Int).
Returns 1 for OK/Yes (IDOK/IDYES), 0 for Cancel/No (IDCANCEL/IDNO), -1 for other (default/X button).
Technical Exegesis...
Displays a customizable message box with selectable button and icon types. Searches gizmoMap for window ID to get parent HWND. Maps buttons parameter to MessageBox flags: 0=MB_OK, 1=MB_OKCANCEL, 2=MB_YESNO, 3=MB_YESNOCANCEL (default 0). Maps icon parameter to MessageBox flags: 0=MB_ICONINFORMATION, 1=MB_ICONWARNING, 2=MB_ICONERROR, 3=MB_ICONQUESTION (default 0). Calls Windows MessageBox() with combined flags. Blocks until user responds.
Displays a customizable message box with selectable button and icon types. Searches gizmoMap for window ID to get parent HWND. Maps buttons parameter to MessageBox flags: 0=MB_OK, 1=MB_OKCANCEL, 2=MB_YESNO, 3=MB_YESNOCANCEL (default 0). Maps icon parameter to MessageBox flags: 0=MB_ICONINFORMATION, 1=MB_ICONWARNING, 2=MB_ICONERROR, 3=MB_ICONQUESTION (default 0). Calls Windows MessageBox() with combined flags. Blocks until user responds. Returns 1 for OK/Yes (IDOK/IDYES), 0 for Cancel/No (IDCANCEL/IDNO), -1 for other (default/X button).
This function provides full control over message box appearance and behavior. Button types: 0=single OK, 1=OK+Cancel, 2=Yes+No, 3=Yes+No+Cancel. Icon types: 0=blue info 'i', 1=yellow warning '!', 2=red error 'X', 3=blue question '?'. Dialog is modal - blocks program execution. Return value mapping: IDOK/IDYES->1 (affirmative), IDCANCEL/IDNO->0 (negative), default->-1 (close/other). Use for complex dialogs requiring specific button/icon combinations. For simple notifications, use bgiNotify(). For Yes/No confirmations, use bgiConfirm().