Ignore:
Timestamp:
Aug 29, 1999, 10:05:08 PM (26 years ago)
Author:
sandervl
Message:

Mouse message handling changes

File:
1 edited

Legend:

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

    r729 r740  
    1 /* $Id: win32wnd.cpp,v 1.34 1999-08-28 19:32:47 sandervl Exp $ */
     1/* $Id: win32wnd.cpp,v 1.35 1999-08-29 20:05:07 sandervl Exp $ */
    22/*
    33 * Win32 Window Code for OS/2
     
    880880{
    881881    if(hwnd == 0) {
    882         //other app lost focus
    883         SendInternalMessageA(WM_ACTIVATEAPP, TRUE, 0); //TODO: Need thread id from hwnd app
    884     }
    885     return SendInternalMessageA(WM_SETFOCUS, hwnd, 0);
     882            //other app lost focus
     883            SendInternalMessageA(WM_ACTIVATEAPP, TRUE, 0); //TODO: Need thread id from hwnd app
     884    }
     885    return  SendInternalMessageA(WM_SETFOCUS, hwnd, 0);
    886886}
    887887//******************************************************************************
     
    890890{
    891891    if(hwnd == 0) {
    892         //other app lost focus
    893         SendInternalMessageA(WM_ACTIVATEAPP, FALSE, 0); //TODO: Need thread id from hwnd app
    894     }
    895     return SendInternalMessageA(WM_KILLFOCUS, hwnd, 0);
     892            //other app lost focus
     893            SendInternalMessageA(WM_ACTIVATEAPP, FALSE, 0); //TODO: Need thread id from hwnd app
     894    }
     895    return  SendInternalMessageA(WM_KILLFOCUS, hwnd, 0);
    896896}
    897897//******************************************************************************
     
    949949        }
    950950    }
    951     SendInternalMessageA(win32ncmsg, lastHitTestVal, MAKELONG(ncx, ncy)); //TODO:
    952     return SendInternalMessageA(win32msg, 0, MAKELONG(clx, cly));
     951    SendInternalMessageA(WM_SETCURSOR, Win32Hwnd, MAKELONG(lastHitTestVal, win32ncmsg));
     952
     953    //WM_NC*BUTTON* is posted when the cursor is in a non-client area of the window
     954    if(lastHitTestVal != HTCLIENT) {
     955            SendInternalMessageA(win32ncmsg, lastHitTestVal, MAKELONG(ncx, ncy)); //TODO:
     956    }
     957    return  SendInternalMessageA(win32msg, 0, MAKELONG(clx, cly));
    953958}
    954959//******************************************************************************
     
    957962{
    958963 ULONG winstate = 0;
     964 ULONG setcursormsg = WM_MOUSEMOVE;
    959965
    960966    if(keystate & WMMOVE_LBUTTON)
     
    969975        winstate |= MK_CONTROL;
    970976
    971     return SendInternalMessageA(WM_MOUSEMOVE, keystate, MAKELONG(x, y));
     977    if(lastHitTestVal != HTCLIENT) {
     978        setcursormsg = WM_NCMOUSEMOVE;
     979    }
     980    //TODO: hiword should be 0 if window enters menu mode (SDK docs)
     981    SendInternalMessageA(WM_SETCURSOR, Win32Hwnd, MAKELONG(lastHitTestVal, setcursormsg));
     982
     983    //WM_NCMOUSEMOVE is posted when the cursor moves into a non-client area of the window
     984    if(lastHitTestVal != HTCLIENT) {
     985            SendInternalMessageA(WM_NCMOUSEMOVE, lastHitTestVal, MAKELONG(x, y));
     986    }
     987    return  SendInternalMessageA(WM_MOUSEMOVE, keystate, MAKELONG(x, y));
    972988}
    973989//******************************************************************************
     
    11471163        return 0;           //TODO: Send WM_SYSCOMMAND if required
    11481164
    1149     case WM_NCHITTEST: //TODO:
    1150         return 0;
     1165    case WM_NCHITTEST: //TODO: Calculate position of
     1166        return HTCLIENT;
    11511167
    11521168    default:
Note: See TracChangeset for help on using the changeset viewer.