diff options
author | Yuqian Yang <crupest@outlook.com> | 2018-09-23 13:03:18 +0000 |
---|---|---|
committer | Yuqian Yang <crupest@outlook.com> | 2018-09-23 13:03:18 +0000 |
commit | 796ba6e1e816ec87a106f2f7b501e38c99f059e1 (patch) | |
tree | 6db4f99f3dc2f85fba3f8339da53849d04a5cfee /CruUI/main.cpp | |
parent | ad8ea7fc26b3e0807d11965d93c26a6ff51db226 (diff) | |
parent | 82f42a4103c168abd3605acad8ee4b9b4f00d79d (diff) | |
download | cru-796ba6e1e816ec87a106f2f7b501e38c99f059e1.tar.gz cru-796ba6e1e816ec87a106f2f7b501e38c99f059e1.tar.bz2 cru-796ba6e1e816ec87a106f2f7b501e38c99f059e1.zip |
Merge branch 'native_message_handler' into 'master'
Window native message event.
See merge request crupest/CruUI!1
Diffstat (limited to 'CruUI/main.cpp')
-rw-r--r-- | CruUI/main.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/CruUI/main.cpp b/CruUI/main.cpp index 7f5c1d1c..56d42894 100644 --- a/CruUI/main.cpp +++ b/CruUI/main.cpp @@ -5,6 +5,7 @@ #include "ui/controls/toggle_button.h" #include "ui/controls/button.h" #include "ui/controls/margin_container.h" +#include "ui/events/ui_event.h" using cru::String; @@ -29,6 +30,15 @@ int APIENTRY wWinMain( Application application(hInstance); Window window; + window.native_message_event.AddHandler([](cru::ui::events::WindowNativeMessageEventArgs& args) + { + if (args.GetWindowMessage().msg == WM_PAINT) + { + OutputDebugStringW(L"Paint!\n"); + //args.SetResult(0); + } + }); + /* // test1 cru::ui::controls::TextBlock text_block; |