summaryrefslogtreecommitdiff
path: root/src/Fl_win32.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2002-02-24 17:52:18 +0000
committerMatthias Melcher <fltk@matthiasm.com>2002-02-24 17:52:18 +0000
commit4603756ed1284dfc9d71a556976f4f5b898abd24 (patch)
tree4a6305d9017b0dc0c34ae97b3ed44f3266a1c1be /src/Fl_win32.cxx
parent0372675ee12e54acd993f6d25a9489c1373caf75 (diff)
- added Win32 native drag'n'drop code
- added dnd support for Fl_Group (not tested with X!) - added dnd support for Fl_Input (not tested with X!) - no Mac implementation yet! Go ahead: drag text or a file from the explorer into a text widget! Tadaa! git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1971 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_win32.cxx')
-rw-r--r--src/Fl_win32.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index 11d2644bc..f9396d367 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_win32.cxx,v 1.33.2.37.2.17 2002/02/20 19:29:57 easysw Exp $"
+// "$Id: Fl_win32.cxx,v 1.33.2.37.2.18 2002/02/24 17:52:17 matthiaswm Exp $"
//
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
//
@@ -45,6 +45,8 @@
#include <ctype.h>
#include <winuser.h>
#include <commctrl.h>
+#include <ole2.h>
+#include <ShellApi.h>
//
@@ -117,6 +119,8 @@ static fd_set fdsets[3];
#define POLLOUT 4
#define POLLERR 8
+extern class FLDropTarget flDropTarget;
+
static int nfds = 0;
static int fd_array_size = 0;
static struct FD {
@@ -935,6 +939,11 @@ Fl_X* Fl_X::make(Fl_Window* w) {
// other windows from the code, or we loose the capture.
ShowWindow(x->xid, !showit ? SW_SHOWMINNOACTIVE :
(Fl::grab() || (style & WS_POPUP)) ? SW_SHOWNOACTIVATE : SW_SHOWNORMAL);
+ // register all windows for potential drag'n'drop operations
+ { static char oleInitialized = 0;
+ if (!oleInitialized) { OleInitialize(0L); oleInitialized=1; }
+ }
+ RegisterDragDrop(x->xid, (IDropTarget*)&flDropTarget);
if (w->modal()) {Fl::modal_ = w; fl_fix_focus();}
return x;
@@ -1065,5 +1074,5 @@ void Fl_Window::make_current() {
}
//
-// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.17 2002/02/20 19:29:57 easysw Exp $".
+// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.18 2002/02/24 17:52:17 matthiaswm Exp $".
//