| DlgMessage | Function (ROM Call 0x1B4)

dialogs.h

short DlgMessage (const char *title, const char *message, short left_button, short right_button);

Displays a message dialog box.

DlgMessage displays a message dialog box, where title is the title string (pass NULL for no title), and message is the content of the message. Both title and message must fit into one screen line, else the calculator will crash (however, on AMS 2.xx, a long message will simply be wrapped in the dialog box). Parameters left_button and right_button determine the type of the left and right buttons which will appear at the bottom of the dialog box. The set of possible buttons is very limited, and possible types are defined in enum Buttons (any other values will cause a crash). The meanings of these constants are:

BT_NONE | No button at all
BT_OK | Button "Enter=OK"
BT_SAVE | Button "Enter=SAVE"
BT_YES | Button "Enter=YES"
BT_CANCEL | Button "Esc=CANCEL"
BT_NO | Button "ESC=NO"
BT_GOTO | Button "Enter=GOTO"

DlgMessage returns KEY_ENTER or KEY_ESC, depending on whether the user exits the dialog by pressing the ENTER or ESC key. This routine may cause heap compression.

Uses: DialogAdd, DialogDo, DialogNew, HeapAlloc, HeapFree, HeapFreeIndir, GKeyIn, strcat, strncpy, ERD_dismissNotice, ERD_notice, ROM Call 0x4D5
Used by: cmd_showstat, cmd_text, EV_defaultHandler, handleVarLinkKey, TE_handleEvent, EV_quit, SymFindPtr