diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index 9b16ad683..31e210e0e 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -141,6 +141,7 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa break; } + case WM_MOUSEHWHEEL : case WM_MOUSEWHEEL : //case WM_RBUTTONDOWN : { @@ -156,6 +157,13 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa return scrollResult; break; } + +/* + { + ::CallWindowProc(_scintillaDefaultProc, hwnd, WM_HSCROLL, ((short)HIWORD(wParam))>0?SB_LINERIGHT:SB_LINELEFT, NULL); + break; + } +*/ case WM_VSCROLL : { if (LOWORD(wParam) == SB_ENDSCROLL) diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h index 8263108a4..5e3c51173 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h @@ -33,6 +33,10 @@ #define WM_MOUSEWHEEL 0x020A #endif //WM_MOUSEWHEEL +#ifndef WM_MOUSEHWHEEL +#define WM_MOUSEHWHEEL 0x020E +#endif //WM_MOUSEHWHEEL + class NppParameters; #define NB_WORD_LIST 4 @@ -594,6 +598,16 @@ protected: static LRESULT CALLBACK scintillaStatic_Proc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) { ScintillaEditView *pScint = (ScintillaEditView *)(::GetWindowLong(hwnd, GWL_USERDATA)); // + if (Message == WM_MOUSEWHEEL || Message == WM_MOUSEHWHEEL) + { + POINT pt; + POINTS pts = MAKEPOINTS(lParam); + POINTSTOPOINT(pt, pts); + HWND hwndOnMouse = WindowFromPoint(pt); + ScintillaEditView *pScintillaOnMouse = (ScintillaEditView *)(::GetWindowLong(hwndOnMouse, GWL_USERDATA)); + if (pScintillaOnMouse != pScint) + return ::SendMessage(hwndOnMouse, Message, wParam, lParam); + } if (pScint) return (pScint->scintillaNew_Proc(hwnd, Message, wParam, lParam)); else