xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
application_context.cpp

The following code example demonstrate the use of xtd::forms::application and xtd::forms::application_context classes.

Windows

macOS

Gnome

#include <xtd/xtd>
using namespace xtd::forms;
int main() {
application_context context;
form form1;
form1.click += [&] {
context.main_form(form1);
};
form1.text("Form 1 (Click the client area to set form as the main form)");
form1.show();
form form2;
form2.click += [&] {
context.main_form(form2);
};
form2.text("Form 2 (Click the client area to set form as the main form)");
form2.show();
form form3;
form3.click += [&] {
context.main_form(form3);
};
form3.text("Form 3 (Click the client area to set form as the main form)");
form3.show();
// if no client area form clicked, the application will not exit when you close the forms.
application::run(context);
}
static void run()
Begins running a standard application message loop on the current thread, without a form.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13