From edee02c31815f92daef956b9f3a4efa15d5440a2 Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Thu, 6 Sep 2018 14:37:51 +0200 Subject: [PATCH] + fix: send Ctrl+Mouse-Wheel zooming to parent window (NP3) too --- scintilla/win32/ScintillaWin.cxx | 4 +++- src/Notepad3.c | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scintilla/win32/ScintillaWin.cxx b/scintilla/win32/ScintillaWin.cxx index 2600c7633..c7492f048 100644 --- a/scintilla/win32/ScintillaWin.cxx +++ b/scintilla/win32/ScintillaWin.cxx @@ -946,7 +946,7 @@ sptr_t ScintillaWin::WndPaint(uptr_t wParam) { PAINTSTRUCT *pps; const bool IsOcxCtrl = (wParam != 0); // if wParam != 0, it contains - // a PAINTSTRUCT* from the OCX + // a PAINTSTRUCT* from the OCX // Removed since this interferes with reporting other assertions as it occurs repeatedly //PLATFORM_ASSERT(hRgnUpdate == nullptr); hRgnUpdate = ::CreateRectRgn(0, 0, 0, 0); @@ -1463,6 +1463,8 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam } else { KeyCommand(SCI_ZOOMOUT); } + // send to main window too ! + ::DefWindowProc(MainHWND(), iMessage, wParam, lParam); } else { // Scroll ScrollTo(topLine + linesToScroll); diff --git a/src/Notepad3.c b/src/Notepad3.c index 384bc6457..73586f627 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -1500,6 +1500,10 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam) return MsgSysCommand(hwnd, umsg, wParam, lParam); break; + case WM_MOUSEWHEEL: + if (wParam & MK_CONTROL) { EditShowZoomCallTip(g_hwndEdit); } + break; + default: if (umsg == msgTaskbarCreated) { if (!IsWindowVisible(hwnd)) { ShowNotifyIcon(hwnd, true); }