diff options
author | crupest <crupest@outlook.com> | 2018-09-23 21:00:46 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-09-23 21:00:46 +0800 |
commit | 82f42a4103c168abd3605acad8ee4b9b4f00d79d (patch) | |
tree | 6db4f99f3dc2f85fba3f8339da53849d04a5cfee /CruUI/main.cpp | |
parent | ad8ea7fc26b3e0807d11965d93c26a6ff51db226 (diff) | |
download | cru-82f42a4103c168abd3605acad8ee4b9b4f00d79d.tar.gz cru-82f42a4103c168abd3605acad8ee4b9b4f00d79d.tar.bz2 cru-82f42a4103c168abd3605acad8ee4b9b4f00d79d.zip |
Add native message handler event in Window.
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; |