xtd 0.2.0
hello_world_message_box.cpp

The classic first application "Hello, World!" with xtd::forms::message_box dialog.

Windows

macOS

Gnome

#include <xtd/xtd>
using namespace xtd::forms;
class main_form : public form {
public:
main_form() {
text("Hello world (message_box)");
button1.location({10, 10});
button1.parent(*this);
button1.text("&Click me");
button1.click += [] {
message_box::show("Hello, World!");
};
}
private:
};
auto main() -> int {
application::run(main_form {});
}
static void run()
Begins running a standard application message loop on the current thread, without a form.
Represents a Windows button control.
Definition button.hpp:49
Represents a window or dialog box that makes up an application's user interface.
Definition form.hpp:54
static dialog_result show(const iwin32_window &owner)
Displays a message box in front of the specified window.
@ button1
The first button on the message box is the default button.
Definition message_dialog_default_button.hpp:24
@ text
The xtd::forms::status_bar_panel displays text in the standard font.
Definition status_bar_panel_style.hpp:25
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:217