xtd 0.2.0
Loading...
Searching...
No Matches
application_application_exit.cpp

Shows how to create an application with xtd::forms::application::application_exit event.

Windows

macOS

Gnome

#define TRACE
#include <xtd/diagnostics/trace>
#include <xtd/forms/application>
#include <xtd/environment>
using namespace xtd;
using namespace xtd::diagnostics;
using namespace xtd::forms;
auto main() -> int {
environment::program_exit += [] {trace::write_line("The program is stopped");};
application::application_exit += [] {trace::write_line("The application is stopped");};
trace::write_line("Before application run");
application::run(form {});
trace::write_line("After application exit");
trace::write_line("Before program exit");
}
// Trace
//
// Before application run
// The application is stopped
// After application exit
// Before program exit
// The program is stopped
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:54
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.h:10
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10