Displays a message window, also known as a dialog box, which presents a message to the user. It is a modal window, blocking other actions in the application until the user closes it. A message_box can contain text, buttons, and symbols that inform and instruct the user.
| Windows | macOS | Gnome | |
|---|---|---|---|
| Light |
html dialog_message_box_m.png html dialog_message_box_g.png | ||
| Dark |
html dialog_message_box_md.png html dialog_message_box_gd.png |
Methods | |
| static dialog_result | show (const iwin32_window &owner) |
| Displays a message box in front of the specified window. More... | |
| static dialog_result | show (const iwin32_window &owner, const xtd::ustring &text) |
| Displays a message box in front of the specified window with specified text. More... | |
| static dialog_result | show (const iwin32_window &owner, const xtd::ustring &text, const xtd::ustring &caption) |
| Displays a message box in front of the specified window with specified text and caption. More... | |
| static dialog_result | show (const iwin32_window &owner, const xtd::ustring &text, const xtd::ustring &caption, message_box_buttons buttons) |
| Displays a message box in front of the specified window with the specified text, caption, and buttons. More... | |
| static dialog_result | show (const iwin32_window &owner, const xtd::ustring &text, const xtd::ustring &caption, message_box_buttons buttons, message_box_icon icon) |
| Displays a message box in front of the specified window with the specified text, caption, buttons, and icon. More... | |
| static dialog_result | show (const iwin32_window &owner, const xtd::ustring &text, const xtd::ustring &caption, message_box_buttons buttons, message_box_icon icon, message_box_default_button default_button) |
| Displays a message box in front of the specified window with the specified text, caption, buttons, icon, and default button. More... | |
| static dialog_result | show (const iwin32_window &owner, const xtd::ustring &text, const xtd::ustring &caption, message_box_buttons buttons, message_box_icon icon, message_box_default_button default_button, message_box_options options) |
| Displays a message box in front of the specified window with the specified text, caption, buttons, icon, default button, and options. More... | |
| static dialog_result | show (const iwin32_window &owner, const xtd::ustring &text, const xtd::ustring &caption, message_box_buttons buttons, message_box_icon icon, message_box_default_button default_button, message_box_options options, bool display_help_button) |
| Displays a message box in front of the specified window with the specified text, caption, buttons, icon, default button, options, and Help button. More... | |
| static dialog_result | show () |
| Displays a message box. More... | |
| static dialog_result | show (const xtd::ustring &text) |
| Displays a message box with specified text. More... | |
| static dialog_result | show (const xtd::ustring &text, const xtd::ustring &caption) |
| Displays a message box with specified text and caption. More... | |
| static dialog_result | show (const xtd::ustring &text, const xtd::ustring &caption, message_box_buttons buttons) |
| Displays a message box with the specified text, caption, and buttons. More... | |
| static dialog_result | show (const xtd::ustring &text, const xtd::ustring &caption, message_box_buttons buttons, message_box_icon icon) |
| Displays a message box with the specified text, caption, buttons, and icon. More... | |
| static dialog_result | show (const xtd::ustring &text, const xtd::ustring &caption, message_box_buttons buttons, message_box_icon icon, message_box_default_button default_button) |
| Displays a message box with the specified text, caption, buttons, icon, and default button. More... | |
| static dialog_result | show (const xtd::ustring &text, const xtd::ustring &caption, message_box_buttons buttons, message_box_icon icon, message_box_default_button default_button, message_box_options options) |
| Displays a message box with the specified text, caption, buttons, icon, default button, and options. More... | |
| static dialog_result | show (const xtd::ustring &text, const xtd::ustring &caption, message_box_buttons buttons, message_box_icon icon, message_box_default_button default_button, message_box_options options, bool display_help_button) |
| Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button. More... | |
|
static |
Displays a message box in front of the specified window.
| owner | An implementation of iwin32_window that will own the modal dialog box. |
|
static |
Displays a message box in front of the specified window with specified text.
| owner | An implementation of iwin32_window that will own the modal dialog box. |
| text | The text to display in the message box. |
|
static |
Displays a message box in front of the specified window with specified text and caption.
| owner | An implementation of iwin32_window that will own the modal dialog box. |
| text | The text to display in the message box. |
| caption | The text to display in the title bar of the message box. |
|
static |
Displays a message box in front of the specified window with the specified text, caption, and buttons.
| owner | An implementation of iwin32_window that will own the modal dialog box. |
| text | The text to display in the message box. |
| caption | The text to display in the title bar of the message box. |
| buttons | One of the message_box_buttons values that specifies which buttons to display in the message box. |
|
static |
Displays a message box in front of the specified window with the specified text, caption, buttons, and icon.
| owner | An implementation of iwin32_window that will own the modal dialog box. |
| text | The text to display in the message box. |
| caption | The text to display in the title bar of the message box. |
| buttons | One of the message_box_buttons values that specifies which buttons to display in the message box. |
| icon | One of the message_box_icon values that specifies which icon to display in the message box. |
|
static |
Displays a message box in front of the specified window with the specified text, caption, buttons, icon, and default button.
| owner | An implementation of iwin32_window that will own the modal dialog box. |
| text | The text to display in the message box. |
| caption | The text to display in the title bar of the message box. |
| buttons | One of the message_box_buttons values that specifies which buttons to display in the message box. |
| icon | One of the message_box_icon values that specifies which icon to display in the message box. |
| default_button | One of the message_box_default_button values that specifies the default button for the message box. |
|
static |
Displays a message box in front of the specified window with the specified text, caption, buttons, icon, default button, and options.
| owner | An implementation of iwin32_window that will own the modal dialog box. |
| text | The text to display in the message box. |
| caption | The text to display in the title bar of the message box. |
| buttons | One of the message_box_buttons values that specifies which buttons to display in the message box. |
| icon | One of the message_box_icon values that specifies which icon to display in the message box. |
| default_button | One of the message_box_default_button values that specifies the default button for the message box. |
| options | One of the message_box_options values that specifies which display and association options will be used for the message box. You may pass in 0 if you wish to use the defaults. |
|
static |
Displays a message box in front of the specified window with the specified text, caption, buttons, icon, default button, options, and Help button.
| owner | An implementation of iwin32_window that will own the modal dialog box. |
| text | The text to display in the message box. |
| caption | The text to display in the title bar of the message box. |
| buttons | One of the message_box_buttons values that specifies which buttons to display in the message box. |
| icon | One of the message_box_icon values that specifies which icon to display in the message box. |
| default_button | One of the message_box_default_button values that specifies the default button for the message box. |
| options | One of the message_box_options values that specifies which display and association options will be used for the message box. You may pass in 0 if you wish to use the defaults. |
| display_help_button | true to show the Help button; otherwise, false. The default is false. |
|
static |
Displays a message box.
|
static |
Displays a message box with specified text.
| text | The text to display in the message box. |
|
static |
Displays a message box with specified text and caption.
| text | The text to display in the message box. |
| caption | The text to display in the title bar of the message box. |
|
static |
Displays a message box with the specified text, caption, and buttons.
| text | The text to display in the message box. |
| caption | The text to display in the title bar of the message box. |
| buttons | One of the message_box_buttons values that specifies which buttons to display in the message box. |
|
static |
Displays a message box with the specified text, caption, buttons, and icon.
| text | The text to display in the message box. |
| caption | The text to display in the title bar of the message box. |
| buttons | One of the message_box_buttons values that specifies which buttons to display in the message box. |
| icon | One of the message_box_icon values that specifies which icon to display in the message box. |
|
static |
Displays a message box with the specified text, caption, buttons, icon, and default button.
| text | The text to display in the message box. |
| caption | The text to display in the title bar of the message box. |
| buttons | One of the message_box_buttons values that specifies which buttons to display in the message box. |
| icon | One of the message_box_icon values that specifies which icon to display in the message box. |
| default_button | One of the message_box_default_button values that specifies the default button for the message box. |
|
static |
Displays a message box with the specified text, caption, buttons, icon, default button, and options.
| text | The text to display in the message box. |
| caption | The text to display in the title bar of the message box. |
| buttons | One of the message_box_buttons values that specifies which buttons to display in the message box. |
| icon | One of the message_box_icon values that specifies which icon to display in the message box. |
| default_button | One of the message_box_default_button values that specifies the default button for the message box. |
| options | One of the message_box_options values that specifies which display and association options will be used for the message box. You may pass in 0 if you wish to use the defaults. |
|
static |
Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button.
| text | The text to display in the message box. |
| caption | The text to display in the title bar of the message box. |
| buttons | One of the message_box_buttons values that specifies which buttons to display in the message box. |
| icon | One of the message_box_icon values that specifies which icon to display in the message box. |
| default_button | One of the message_box_default_button values that specifies the default button for the message box. |
| options | One of the message_box_options values that specifies which display and association options will be used for the message box. You may pass in 0 if you wish to use the defaults. |
| display_help_button | true to show the Help button; otherwise, false. The default is false. |