From 019cbb652310a55064cda9960e2175bb94530f0b Mon Sep 17 00:00:00 2001 From: zhongyang219 Date: Wed, 8 Jan 2025 15:08:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=80=89=E9=A1=B9=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=AF=B9=E8=AF=9D=E6=A1=86=E4=B8=AD=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E8=A7=A6=E6=91=B8=E6=9D=BF=E6=89=8B=E5=8A=BF=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E8=BF=87=E5=BF=AB=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TrafficMonitor/TabDlg.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/TrafficMonitor/TabDlg.cpp b/TrafficMonitor/TabDlg.cpp index 96c946f16..2dc0f12a5 100644 --- a/TrafficMonitor/TabDlg.cpp +++ b/TrafficMonitor/TabDlg.cpp @@ -184,15 +184,8 @@ BOOL CTabDlg::OnMouseWheel(UINT nFlags, short zDelta, CPoint pt) // TODO: 在此添加消息处理程序代码和/或调用默认值 if (m_scroll_enable) { - int step = theApp.DPI(64); - if (zDelta > 0) - { - ScrollWindowSimple(step); - } - if (zDelta < 0) - { - ScrollWindowSimple(-step); - } + int step = theApp.DPI(64) * zDelta / 120; + ScrollWindowSimple(step); SCROLLINFO scrollinfo; GetScrollInfo(SB_VERT, &scrollinfo, SIF_ALL); m_last_pos = scrollinfo.nPos;