Shows how to create an application with xtd::forms::application class with xtd::forms::application_context class.
- Windows
-
- macOS
-
- Gnome
-
#include <xtd/forms/application>
#include <xtd/forms/application_context>
#include <xtd/forms/form>
auto main()->int {
auto form1 =
form::create(
"Form 1 (Click the client area to set form as the main form)");
form1.click += [&] {context.main_form(form1);};
form1.show();
auto form2 =
form::create(
"Form 2 (Click the client area to set form as the main form)");
form2.click += [&] {context.main_form(form2);};
form2.show();
auto form3 =
form::create(
"Form 3 (Click the client area to set form as the main form)");
form3.click += [&] {context.main_form(form3);};
form3.show();
}