浏览代码

test drag & drop

Hongtae Kim 8 年前
父节点
当前提交
19601e15d9
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10
    1
      TestApp1/TestApp1.cpp

+ 10
- 1
TestApp1/TestApp1.cpp 查看文件

@@ -15,7 +15,16 @@ public:
15 15
 	void OnInitialize(void) override
16 16
 	{
17 17
 		DKLog("%s", DKGL_FUNCTION_NAME);
18
-		window = DKWindow::Create("DefaultWindow", DKWindow::StyleGenericWindow, this->EventLoop());
18
+		DKWindow::WindowCallback cb = {};
19
+
20
+		cb.filesDropped = DKFunction([](DKWindow*, const DKPoint&, const DKWindow::WindowCallback::StringArray&) {
21
+			DKLog("cb.filesDropped");
22
+		});
23
+
24
+		window = DKWindow::Create("DefaultWindow", 
25
+								  DKWindow::StyleGenericWindow|DKWindow::StyleAcceptFileDrop,
26
+								  this->EventLoop(),
27
+								  cb);
19 28
 		window->Activate();
20 29
 
21 30
 		window->AddEventHandler(this,