diff options
author | crupest <crupest@outlook.com> | 2018-09-23 21:07:19 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-09-23 21:07:19 +0800 |
commit | 800c98a732f82df09a98fddba91eddb5d675318d (patch) | |
tree | bd7722bebd51e8bb47e79468d70c0d99ef0df9ac /CruUI/ui/window.cpp | |
parent | b7833b2d3243b008a2a726a72408f818070d8238 (diff) | |
parent | 796ba6e1e816ec87a106f2f7b501e38c99f059e1 (diff) | |
download | cru-800c98a732f82df09a98fddba91eddb5d675318d.tar.gz cru-800c98a732f82df09a98fddba91eddb5d675318d.tar.bz2 cru-800c98a732f82df09a98fddba91eddb5d675318d.zip |
Merge branch 'master' into textboxdev
Diffstat (limited to 'CruUI/ui/window.cpp')
-rw-r--r-- | CruUI/ui/window.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/CruUI/ui/window.cpp b/CruUI/ui/window.cpp index b20abb61..6ff962b6 100644 --- a/CruUI/ui/window.cpp +++ b/CruUI/ui/window.cpp @@ -82,7 +82,7 @@ namespace cru Vector<Window*> windows; for (auto [key, value] : window_map_) windows.push_back(value); - return std::move(windows); + return windows; } inline Point PiToDip(const POINT& pi_point) @@ -201,6 +201,19 @@ namespace cru } bool Window::HandleWindowMessage(HWND hwnd, int msg, WPARAM w_param, LPARAM l_param, LRESULT & result) { + + if (!native_message_event.IsNoHandler()) + { + const events::WindowNativeMessage message{hwnd, msg, w_param, l_param}; + events::WindowNativeMessageEventArgs args(this, this, message); + native_message_event.Raise(args); + if (args.GetResult().has_value()) + { + result = args.GetResult().value(); + return true; + } + } + switch (msg) { case WM_PAINT: OnPaintInternal(); |