Browse Source

[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
remotes/patch_testing@481
Don Ho 17 years ago
parent
commit
acb336d913
  1. 14
      PowerEditor/src/Notepad_plus.cpp
  2. 2
      PowerEditor/src/resource.h

14
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);

2
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

Loading…
Cancel
Save