From ae9f90bd5f190ccbb05cf56c2a1db6b7a4fa284f Mon Sep 17 00:00:00 2001 From: donho Date: Sat, 15 Mar 2008 16:03:57 +0000 Subject: [PATCH] [NEW_FEATURE] Add DnD feature (WM_DROPFILES) for the plugins windows. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@146 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 14 +++++++++----- PowerEditor/src/resource.h | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index e4f53ab2..fb8b9c23 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -4402,12 +4402,16 @@ void Notepad_plus::dropFiles(HDROP hdrop) POINT p; ::DragQueryPoint(hdrop, &p); HWND hWin = ::ChildWindowFromPoint(_hSelf, p); - if (hWin) + if (!hWin) return; + + if ((_mainEditView.getHSelf() == hWin) || (_mainDocTab.getHSelf() == hWin)) + switchEditViewTo(MAIN_VIEW); + else if ((_subEditView.getHSelf() == hWin) || (_subDocTab.getHSelf() == hWin)) + switchEditViewTo(SUB_VIEW); + else { - if ((_mainEditView.getHSelf() == hWin) || (_mainDocTab.getHSelf() == hWin)) - switchEditViewTo(MAIN_VIEW); - else if ((_subEditView.getHSelf() == hWin) || (_subDocTab.getHSelf() == hWin)) - switchEditViewTo(SUB_VIEW); + ::SendMessage(hWin, WM_DROPFILES, (WPARAM)hdrop, 0); + return; } int filesDropped = ::DragQueryFile(hdrop, 0xffffffff, NULL, 0); diff --git a/PowerEditor/src/resource.h b/PowerEditor/src/resource.h index 0ed86a97..6fc5cac7 100644 --- a/PowerEditor/src/resource.h +++ b/PowerEditor/src/resource.h @@ -19,7 +19,7 @@ #define RESOURCE_H #define NOTEPAD_PLUS_VERSION "Notepad++ v4.8.2" -#define VERSION_VALUE "4.8.2\0" // should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71 +#define VERSION_VALUE "4.82\0" // should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71 #define VERSION_DIGITALVALUE 4, 8, 2, 0 #ifndef IDC_STATIC