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

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

Windows

macOS

Gnome

#define DEBUG
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/debug_form>
#include <xtd/forms/debug_message_dialog>
#include <xtd/forms/form>
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
button_show_debug_message.location({10, 10});
button_show_debug_message.parent(*this);
button_show_debug_message.text("Error...");
button_show_debug_message.auto_size(true);
button_show_debug_message.click += [&] {
auto dialog = debug_message_dialog {};
dialog.message("An unknown process error occured.");
dialog.show_sheet_dialog(*this);
};
}
private:
button button_show_debug_message;
};
auto main()->int {
auto df = debug_form {};
application::run(form1 {});
}
Represents a Windows button control.
Definition button.h:47
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 form that displays debug form. This class cannot be inherited.
Definition debug_form.h:34
Displays a message window and write debug, which presents a debug message to the user.
Definition debug_message_dialog.h:28
xtd::ustring message() const noexcept
Gets the text message.
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:52
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12