Browse Source

test drag & drop

Hongtae Kim 8 years ago
parent
commit
19601e15d9
1 changed files with 10 additions and 1 deletions
  1. 10
    1
      TestApp1/TestApp1.cpp

+ 10
- 1
TestApp1/TestApp1.cpp View File

@@ -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,