Browse Source

no message

Hongtae Kim 7 years ago
parent
commit
6fc403e12a
1 changed files with 17 additions and 2 deletions
  1. 17
    2
      TestApp1/TestApp1.cpp

+ 17
- 2
TestApp1/TestApp1.cpp View File

@@ -6,7 +6,7 @@
6 6
 #endif
7 7
 
8 8
 #include <DK.h>
9
-
9
+#include <functional>
10 10
 class TestApp1 : public DKApplication
11 11
 {
12 12
 public:
@@ -22,5 +22,20 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
22 22
 int main(int argc, const char * argv[])
23 23
 #endif
24 24
 {
25
-	return TestApp1().Run();
25
+	TestApp1 app;
26
+	app.EventLoop()->Post(DKFunction([&]()
27
+	{
28
+		DKLog("test1");
29
+	})->Invocation(), 2);
30
+	app.EventLoop()->Post(DKFunction([&]()
31
+	{
32
+		DKLog("test2");
33
+	})->Invocation(), 4);
34
+	app.EventLoop()->Post(DKFunction([&]()
35
+	{
36
+		DKLog("Terminate!!");
37
+		app.Terminate(0);
38
+	})->Invocation(), 6);
39
+
40
+	return app.Run();
26 41
 }