标签:
BOOL CMainWindow::OnMouseWheel(UINT nFlags, short zDelta, CPoint point) { BOOL bUp = TRUE; int nDelta = zDelta; if(zDelta < 0) { bUp = FALSE; nDelta = -nDelta; } UINT nWheelScrollLines; ::SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, &nWheelScrollLines, 0); int nLines = (nDelta * nWheelScrollLines) / WHEEL_DELTA; while(nLines--) SendMessage(WM_VSCROLL, MAKEWPARAM(bUp ? SB_LINEUP : SB_LINEDOWN, 0), 0); return TRUE; }
标签:
原文地址:http://www.cnblogs.com/beginner/p/4513980.html