Ignore:
Timestamp:
Jan 15, 2000, 4:05:37 PM (26 years ago)
Author:
sandervl
Message:

ScrollWindow & non-client scroll tracking bugfixes/changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/new/win32wbasenonclient.cpp

    r2444 r2445  
    1 /* $Id: win32wbasenonclient.cpp,v 1.8 2000-01-15 14:18:18 cbratschi Exp $ */
     1/* $Id: win32wbasenonclient.cpp,v 1.9 2000-01-15 15:05:37 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2 (non-client methods)
     
    194194    if ((wParam & 0x0f) != HTHSCROLL) return;
    195195    scrollbar = SB_HORZ;
    196   } else  /* SC_VSCROLL */
     196  }
     197  else  /* SC_VSCROLL */
    197198  {
    198199    if ((wParam & 0x0f) != HTVSCROLL) return;
     
    203204  pt.y -= rectWindow.top;
    204205  SCROLL_HandleScrollEvent(Win32Hwnd,0,MAKELONG(pt.x,pt.y),scrollbar,WM_LBUTTONDOWN);
    205   if (GetCapture() != Win32Hwnd) return;
     206  if (GetCapture() != getWindowHandle()) return;
    206207  do
    207208  {
    208     GetMessageA(&msg,Win32Hwnd,0,0);
    209     switch(msg.message)
    210     {
    211       case WM_LBUTTONUP:
    212       case WM_MOUSEMOVE:
    213         pt.x = msg.pt.x-rectWindow.left;
    214         pt.y = msg.pt.y-rectWindow.top;
    215         msg.lParam = MAKELONG(pt.x,pt.y);
    216       case WM_SYSTIMER:
    217         SCROLL_HandleScrollEvent(Win32Hwnd,msg.wParam,msg.lParam,scrollbar,msg.message);
    218         break;
    219 
    220       default:
     209    GetMessageA(&msg, 0, 0, 0);
     210    if(msg.hwnd == getWindowHandle())
     211    {
     212        switch(msg.message)
     213        {
     214        case WM_LBUTTONUP:
     215        case WM_MOUSEMOVE:
     216            pt.x = msg.pt.x-rectWindow.left;
     217            pt.y = msg.pt.y-rectWindow.top;
     218            msg.lParam = MAKELONG(pt.x,pt.y);
     219
     220        case WM_SYSTIMER:
     221            SCROLL_HandleScrollEvent(Win32Hwnd,msg.wParam,msg.lParam,scrollbar,msg.message);
     222            break;
     223
     224        default:
     225            TranslateMessage(&msg);
     226            DispatchMessageA(&msg);
     227            break;
     228        }
     229    }
     230    else {
    221231        TranslateMessage(&msg);
    222232        DispatchMessageA(&msg);
    223         break;
    224233    }
    225234    if (!IsWindow())
     
    228237      break;
    229238    }
    230   } while (msg.message != WM_LBUTTONUP);
     239  }
     240  while (msg.message != WM_LBUTTONUP);
    231241}
    232242//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.