Display OK / Cancel Message Box

? tab(-10, AG_MESSAGEBOXOK); btnflag; msg; tilde; title; chr(127);

The function AG_MESSAGEBOXOK (4) displays a message in a dialog box that is positioned along the bottom couple of lines of the window. This is meant to approximate the GUI version of MESAG.SBR (which see in the A-Shell XCALL Reference). For example: 

Parameters

btnflag

A single character which must be a space (ASCII 32) to display just an OK button in the dialog, or an exclamation point (ASCII 33) to display both OK and CANCEL buttons

msg

A text string containing the message to display in the body of the dialog.

title

A text string to be displayed on the title bar of the dialog.

Example

? TAB(-10,4);"!Make sure you have a backup before posting!"; ~Read This!";chr(127);

 

Notes

The dialog returns a single byte to the keyboard buffer indicating which button was pushed: ESCAPE (ASCII 27) for the Cancel button and RETURN (ASCII 13) for the OK button.

Also see Tab(-10,4), MSGBOX.SBX (in the A-Shell XCALL Reference), and EVTMSG.SBX and XTRMSG.SBX (in the Open Source Library).