IupMessageDlg

Definition: include pGUI.e

Ihandle ih = IupMessageDlg()
Description: Creates the Message Dialog element. It is a predefined dialog for displaying a message. The dialog can be shown with the IupPopup function only.

Returns: the identifier of the created element, or NULL if an error occurs.
Notes: The IupMessageDlg is a native pre-defined dialog not altered by IupSetLanguage.

To show the dialog, use function IupPopup.

The dialog is mapped only inside IupPopup, IupMap does nothing.

In Windows the position (x,y) used in IupPopup is ignored and the dialog is always centered on screen.

The IupMessage function simply creates and popup a IupMessageDlg.

In Windows each different dialog type is always associated with a different beep sound.

In Windows, if PARENTDIALOG is specified then it will be modal relative only to its parent.
Attributes:
BUTTONDEFAULT Number of the default button. Can be "1", "2" or "3". "2" is valid only for "RETRYCANCEL", "OKCANCEL" and "YESNO" button configurations. "3" is valid only for "YESNOCANCEL". Default: "1".
BUTTONRESPONSE Number of the pressed button. Can be "1", "2" or "3". Default: "1".
BUTTONS Buttons configuration. Can have values: "OK", "OKCANCEL", "RETRYCANCEL", "YESNO", or "YESNOCANCEL". Default: "OK". Additionally the "Help" button is displayed if the HELP_CB callback is defined. (RETRYCANCEL and YESNOCANCEL since 3.16)
DIALOGTYPE Type of dialog defines which icon will be displayed besides the message text. Can have values: "MESSAGE" (No Icon), "ERROR" (Stop-sign), "WARNING" (Exclamation-point), "QUESTION" (Question-mark) or "INFORMATION" (Letter "i"). Default: "MESSAGE".
PARENTDIALOG (creation only) Name of a dialog to be used as parent. This dialog will be always in front of the parent dialog. If not defined in Motif the dialog could not be modal.
TITLE Dialog title.
VALUE Message text.
Callbacks:
HELP_CB Action generated when the Help button is pressed.
Example:
Ihandle dlg = IupMessageDlg();

IupSetAttribute(dlg, "DIALOGTYPE", "WARNING");
IupSetAttribute(dlg, "TITLE", "IupMessageDlg Test");
IupSetAttribute(dlg, "BUTTONS", "OKCANCEL");
IupSetAttribute(dlg, "VALUE", "Message Text\nSecond Line");
IupSetCallback(dlg, "HELP_CB", Icallback("help_cb"));

IupPopup(dlg, IUP_CURRENT, IUP_CURRENT);

printf(1,"BUTTONRESPONSE(%s)\n", {IupGetAttribute(dlg, "BUTTONRESPONSE")});

IupDestroy(dlg)
See Also: IupMessage, IupGetParam, IupListDialog, IupAlarm, IupGetFile, IupPopup, IupSetCallback