auto app = Gtk::Application::create(argc, argv, "org.gtkmm.examples.base");

Gtk::MessageDialog dialog{"hello world"};
dialog.run();

Sample Code

ref:

https://github.com/prof-rice/learning_gtkmm

function ref

https://developer-old.gnome.org/gtkmm/stable/classGtk_1_1MessageDialog.html

// Initialize GTK
Gtk::Main kit(argc, argv);

Gtk::MessageDialog *dialog = new Gtk::MessageDialog{"Message"};

dialog->set_secondary_text("<u>under line test</u>", true);

dialog->run();

dialog->close();

delete dialog;

Set Color parameters

Gtk::MessageDialog *dialog = new Gtk::MessageDialog{"Message"};
dialog->set_secondary_text("<b>Bold</b>, <u>underlined</u>, and <span fgcolor='#ff0000'>Col</span>" 
        "<span fgcolor='#00ff00'>or</span> <span fgcolor='#0000ff'>ful</span> text!", "Testing 1 2 3");

Title, Message, Secondary text

Untitled

Gtk::MessageDialog *dialog = new Gtk::MessageDialog{"Message"};
  dialog->set_title("hooo");
  dialog->set_message("<u>hello world</u>", true);
  dialog->set_secondary_text("<u>Secondary</u>", true);

dialog→add_button

ref

https://developer-old.gnome.org/gtkmm/3.24/classGtk_1_1Dialog.html

Untitled

Untitled