diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index ce9a38c41..53298bd9c 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -3795,10 +3795,8 @@ void Notepad_plus::dropFiles(HDROP hdrop) { // Determinate in which view the file(s) is (are) dropped POINT p; - ::GetCursorPos(&p); - HWND hWnd = WindowFromPoint(p); - ::MapWindowPoints(NULL, hWnd, &p, 1); - HWND hWin = ::RealChildWindowFromPoint(hWnd, p); + ::DragQueryPoint(hdrop, &p); + HWND hWin = ::ChildWindowFromPointEx(_pPublicInterface->getHSelf(), p, CWP_SKIPINVISIBLE); if (!hWin) return; if ((_subEditView.getHSelf() == hWin) || (_subDocTab.getHSelf() == hWin)) diff --git a/PowerEditor/src/NppNotification.cpp b/PowerEditor/src/NppNotification.cpp index 086cce7e4..f9d65c6c5 100644 --- a/PowerEditor/src/NppNotification.cpp +++ b/PowerEditor/src/NppNotification.cpp @@ -907,9 +907,8 @@ BOOL Notepad_plus::notify(SCNotification *notification) POINT p; ::GetCursorPos(&p); - HWND hWnd = WindowFromPoint(p); - ::MapWindowPoints(NULL, hWnd, &p, 1); - HWND hWin = ::RealChildWindowFromPoint(hWnd, p); + ::MapWindowPoints(NULL, _pPublicInterface->getHSelf(), &p, 1); + HWND hWin = ::ChildWindowFromPointEx(_pPublicInterface->getHSelf(), p, CWP_SKIPINVISIBLE); const int tipMaxLen = 1024; static TCHAR docTip[tipMaxLen]; docTip[0] = '\0';