OnMouseWheel的通常处理
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; }