Skip to main content

dxMessageDlg(string,TMsgDlgType,TMsgDlgButtons,Longint) Method

Invokes a modal message dialog box.

Declaration

function dxMessageDlg(const AMessage: string; ADialogType: TMsgDlgType; AButtons: TMsgDlgButtons; AHelpContext: Longint): Integer;

Parameters

Name Type Description
AMessage string

Message dialog box content. The AMessage parameter value initializes the created form’s Message property.

The AMessage parameter supports a set of BBCode-inspired tags that allow you to format message box content. Refer to the Remarks section for the full list of supported formatting tags.

ADialogType TMsgDlgType

A message dialog box type that determines the predefined caption, system icon, and sound of the message box.

AButtons TMsgDlgButtons

A set of buttons on the message dialog box form.

AHelpContext Longint

A context ID for the help topic that a click on the Help button or the F1 keystroke should invoke while the message box is displayed.

Returns

Type Description
Integer

An integer value that indicates the button clicked to close the message box.

The dxMessageBox function returns 0 if it fails to invoke a message box.

Refer to the list of possible returned values below.

Remarks

Call the dxMessageDlg function to invoke a generic dialog box with a message and one or more buttons. The created message dialog box has the mdsMessageDlg style.

VCL Editors Library: A Message Dialog Box Example

Supported BBCode-Inspired Markup Tags

Text Formatting Attribute Message Text with Tags Example
Bold '[B]DevExpress[/B]' VCL Editors Library: A Bold Font Attribute Example
Italic '[I]DevExpress[/I]' VCL Editors Library: An Italic Font Attribute Example
Underscore '[U]DevExpress[/U]' VCL Editors Library: An Underscore Font Attribute Example
Strikeout '[S]DevExpress[/S]' VCL Editors Library: A Strikeout Font Attribute Example
Subscript 'Dev[Sub]Express[/Sub]' VCL Editors Library: A Subscript Font Attribute Example
Superscript 'Dev[Sup]Express[/Sup]' VCL Editors Library: A Superscript Font Attribute Example
Custom Font 'Dev[U][Font=Consolas][Size=12]Express[/U][/Font][/Size]' VCL Editors Library: A Custom Font Settings Example
Color '[Color=#E67E22]Dev[/Color][Color=Gray]Express[/Color]' VCL Editors Library: A Color Font Attribute Example
Background Color '[BackColor=Orange]DevExpress[/BackColor]' VCL Editors Library: A Background Color Font Attribute Example
Hyperlink '[URL=http://www.devexpress.com/]DevExpress[/URL]' VCL Editors Library: A Hyperlink Example
No Parse '[NOPARSE][B]DevExpress[/B][/NOPARSE]' VCL Editors Library: A "No Parse" Example

Returned Values

IDOK
A user clicked the OK button to close the message box.
IDCANCEL
A user clicked the Cancel button to close the message box.
IDABORT
A user clicked the Abort button to close the message box.
IDRETRY
A user clicked the Retry button to close the message box.
IDIGNORE
A user clicked the Ignore button to close the message box.
IDYES
A user clicked the Yes button to close the message box.
IDNO
A user clicked the No button to close the message box.
See Also