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

demonstrates the use of xtd::forms::trace_message_box dialog.

Windows

macOS

Gnome

#define TRACE
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/form>
#include <xtd/forms/trace_form>
#include <xtd/forms/trace_message_box>
#include <xtd/startup>
using namespace xtd;
using namespace xtd::diagnostics;
using namespace xtd::drawing;
using namespace xtd::forms;
class form_main : public form {
public:
form_main() {
button_.parent(*this);
button_.location({10, 10});
button_.text("Error...");
button_.click += [&] {
trace_message_box::show(*this, "An unknown process error occured.");
};
}
static auto main() {
auto tf = trace_form {};
}
private:
button button_;
};
startup_(form_main::main);
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
virtual drawing::point location() const noexcept
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its...
Represents a window or dialog box that makes up an application's user interface.
Definition form.hpp:54
control & parent(const control &value) override
Sets the parent container of the control.
Represents a form that displays trace form. This class cannot be inherited.
Definition trace_form.hpp:36
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.hpp:175
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.hpp:10
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition brush.hpp:18
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.hpp:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10