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_NONENo button at all
BT_OKButton "Enter=OK"
BT_SAVEButton "Enter=SAVE"
BT_YESButton "Enter=YES"
BT_CANCELButton "Esc=CANCEL"
BT_NOButton "ESC=NO"
BT_GOTOButton "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