Changeset 216 for trunk/src


Ignore:
Timestamp:
Jun 26, 1999, 3:45:20 PM (26 years ago)
Author:
sandervl
Message:

Msg handler bugfix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/wndclass.cpp

    r215 r216  
    1 /* $Id: wndclass.cpp,v 1.9 1999-06-26 13:21:11 sandervl Exp $ */
     1/* $Id: wndclass.cpp,v 1.10 1999-06-26 13:45:20 sandervl Exp $ */
    22
    33/*
     
    6767LRESULT WIN32API ButtonCallback(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
    6868{
    69  DWORD dwStyle, dwExStyle;
     69 DWORD   dwStyle, dwExStyle;
     70 LRESULT rc;
    7071
    7172  PostSpyMessage(hwnd, Msg, wParam, lParam);
     
    9293                }
    9394                break;
     95        case WM_LBUTTONDOWN:
     96                rc = ButtonHandler(hwnd, Msg, wParam, lParam);
     97
     98                NotifyParent(hwnd, Msg, wParam, lParam);
     99                dwStyle   = GetWindowLongA(hwnd, GWL_STYLE);
     100                dwExStyle = GetWindowLongA(hwnd, GWL_EXSTYLE);
     101
     102                if(dwStyle & WS_CHILD && !(dwExStyle & WS_EX_NOPARENTNOTIFY) )
     103                {
     104                        HWND hwndParent = GetParent(hwnd);
     105
     106                        //TODO: Mouse shouldn't be captured
     107                        Win32WindowProc *parentwnd = Win32WindowProc::FindProc(hwndParent);
     108                        if(parentwnd) {
     109                                //TODO: HTCLIENT isn't always accurate
     110                                parentwnd->SendMessageA(hwndParent, WM_SETCURSOR, hwnd, HTCLIENT | (WM_LBUTTONDOWN << 16));
     111                        }
     112                }       
     113                return rc;
    94114        case WM_CREATE:
    95115        case WM_DESTROY:
    96         case WM_LBUTTONDOWN:
    97116        case WM_MBUTTONDOWN:
    98117        case WM_RBUTTONDOWN:
Note: See TracChangeset for help on using the changeset viewer.