- {
- if (! GetMessageW(&Msg, 0, 0, 0))
- {
- break;
- }
- if (CallMsgFilterW(&Msg, MSGF_SCROLLBAR))
- {
- continue;
- }
-
- switch(Msg.message)
- {
- case WM_SYSTIMER:
- case WM_LBUTTONUP:
- case WM_MOUSEMOVE:
- Pt.x = LOWORD(Msg.lParam) + XOffset;
- Pt.y = HIWORD(Msg.lParam) + YOffset;
- IntScrollHandleScrollEvent(Wnd, SBType, Msg.message, Pt);
- break;
- default:
- TranslateMessage(&Msg);
- DispatchMessageW(&Msg);
- break;
- }
-
- if (! IsWindow(Wnd))
- {
+ {
+ if (!GetMessageW(&Msg, 0, 0, 0)) break;
+ if (CallMsgFilterW(&Msg, MSGF_SCROLLBAR)) continue;
+ if ( Msg.message == WM_LBUTTONUP ||
+ Msg.message == WM_MOUSEMOVE ||
+ (Msg.message == WM_SYSTIMER && Msg.wParam == SCROLL_TIMER))
+ {
+ Pt.x = LOWORD(Msg.lParam) + XOffset;
+ Pt.y = HIWORD(Msg.lParam) + YOffset;
+ IntScrollHandleScrollEvent(Wnd, SBType, Msg.message, Pt);
+ }
+ else
+ {
+ TranslateMessage(&Msg);
+ DispatchMessageW(&Msg);
+ }
+ if (!IsWindow(Wnd))
+ {