xtd 0.2.0
Loading...
Searching...
No Matches
xtd::forms::trace_message_box Class Reference
Inheritance diagram for xtd::forms::trace_message_box:
xtd::static_object

Definition

Displays a dialog box and write trace.

Header
#include <xtd/forms/trace_message_box>
Namespace
xtd::forms
Library
xtd.forms
Appearance
Windows macOS Gnome
Light  
 
 
 
 
 
Dark  
 
 
 
 
 
Examples
The following code example demonstrates the use of trace_message_box dialog.
#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 actions_system_images.hpp:11
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

Public Static Methods

static xtd::forms::dialog_result show (const xtd::string &text)
 Displays a message box and write trace with specified text.
 
static xtd::forms::dialog_result show (const xtd::forms::iwin32_window &owner, const xtd::string &text)
 Displays a message box in front of the specified window and write trace with specified text.
 

Member Function Documentation

◆ show() [1/2]

static xtd::forms::dialog_result xtd::forms::trace_message_box::show ( const xtd::string text)
inlinestatic

Displays a message box and write trace with specified text.

Parameters
textThe text to display in the message box.

◆ show() [2/2]

static xtd::forms::dialog_result xtd::forms::trace_message_box::show ( const xtd::forms::iwin32_window owner,
const xtd::string text 
)
inlinestatic

Displays a message box in front of the specified window and write trace with specified text.

Parameters
ownerAn implementation of iwin32_window that will own the modal dialog box.
textThe text to display in the message box.

The documentation for this class was generated from the following file: