xtd 0.2.0
Loading...
Searching...
No Matches
message.h
Go to the documentation of this file.
1
4#pragma once
5#include "../forms_export.h"
6#include <xtd/object>
7#include <xtd/string>
8#include <cstdint>
9#include <iomanip>
10#include <sstream>
11#include <string>
12
13namespace xtd {
14 namespace forms {
28 class forms_export_ message : public object {
29 public:
31 message() = default;
32 message(const message& message) = default;
33 message& operator =(const message&) = default;
35
37
42 intptr hwnd() const noexcept;
46 void hwnd(intptr value);
47
51 intptr lparam() const noexcept;
55 void lparam(intptr value);
56
59 uint32 msg() const noexcept;
62 void msg(uint32 value);
63
66 intptr result() const noexcept;
69 void result(intptr value);
70
74 intptr wparam() const noexcept;
78 void wparam(intptr value);
80
82 intptr handle() const noexcept;
83 void handle(intptr value);
85
87
92 template<typename type_t>
93 type_t get_lparam() const noexcept { return reinterpret_cast<type_t>(lparam_); }
94
97 xtd::string to_msg_string() const noexcept;
98
101 xtd::string to_string() const noexcept override;
103
105
114 static message create(intptr hwnd, int32 msg, intptr wparam, intptr lparam);
116
118 static message create(intptr hwnd, int32 msg, intptr wparam, intptr lparam, intptr result);
119 static message create(intptr hwnd, int32 msg, intptr wparam, intptr lparam, intptr result, intptr handle);
121
122 private:
123 message(intptr hwnd, int32 msg, intptr wparam, intptr lparam);
124 message(intptr hwnd, int32 msg, intptr wparam, intptr lparam, intptr result);
125 message(intptr hwnd, int32 msg, intptr wparam, intptr lparam, intptr result, intptr handle);
126
127 intptr hwnd_ = 0;
128 uint32 msg_ = 0;
129 intptr wparam_ = 0;
130 intptr lparam_ = 0;
131 intptr result_ = 0;
132 intptr handle_ = 0;
133 inline static int32 id_ = 0;
134 };
135 }
136}
Represents text as a sequence of character units.
Definition basic_string.h:79
Implements a Windows message.
Definition message.h:28
xtd::string to_msg_string() const noexcept
Returns a string that represents the msg property.
intptr hwnd() const noexcept
Gets the window handle of the message.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
#define forms_export_
Define shared library export.
Definition forms_export.h:13
int32_t int32
Represents a 32-bit signed integer.
Definition int32.h:23
uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.h:23
intmax_t intptr
Represent a pointer or a handle.
Definition intptr.h:23
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