Ignore:
Timestamp:
Mar 31, 2000, 4:42:49 PM (25 years ago)
Author:
cbratschi
Message:

HTTRANSPARENT

File:
1 edited

Legend:

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

    r3127 r3284  
    1 /* $Id: oslibmsgtranslate.cpp,v 1.25 2000-03-16 19:19:09 sandervl Exp $ */
     1/* $Id: oslibmsgtranslate.cpp,v 1.26 2000-03-31 14:42:47 cbratschi Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    138138  POSTMSG_PACKET  *packet;
    139139  THDB            *thdb = (THDB *)pThdb;
    140   ULONG            hittest;
    141140  int i;
    142141
     
    165164    switch (os2Msg->msg)
    166165    {
     166      case WM_HITTEST:
     167        winMsg->message = WINWM_NCHITTEST;
     168        winMsg->wParam  = 0;
     169        winMsg->lParam  = MAKELONG(winMsg->pt.x,winMsg->pt.y);
     170
     171        return TRUE;
     172
    167173      case WM_BUTTON1DOWN:
    168174      case WM_BUTTON1UP:
     
    176182        //WM_NC*BUTTON* is posted when the cursor is in a non-client area of the window
    177183
    178         hittest = win32wnd->MsgHitTest(winMsg->pt.x, winMsg->pt.y);
    179 
    180184        if (IsNCMouseMsg(win32wnd)) {
    181185            winMsg->message = WINWM_NCLBUTTONDOWN + (os2Msg->msg - WM_BUTTON1DOWN);
    182             winMsg->wParam  = hittest;
     186            winMsg->wParam  = win32wnd->getLastHitTestVal();
    183187            winMsg->lParam  = MAKELONG(winMsg->pt.x, winMsg->pt.y); //screen coordinates
    184188        }
     
    197201            if(DInputMouseHandler(win32wnd->getWindowHandle(), winMsg->message, winMsg->pt.x, winMsg->pt.y)) {
    198202                goto dummymessage; //dinput swallowed message
    199             }
     203            }
    200204        }
    201205
     
    216220      {
    217221        //WM_NCMOUSEMOVE is posted when the cursor moves into a non-client area of the window
    218         hittest = win32wnd->MsgHitTest(winMsg->pt.x, winMsg->pt.y);
    219222
    220223        if (IsNCMouseMsg(win32wnd))
    221224        {
    222225          winMsg->message = WINWM_NCMOUSEMOVE;
    223           winMsg->wParam  = (WPARAM)hittest;
     226          winMsg->wParam  = (WPARAM)win32wnd->getLastHitTestVal();
    224227          winMsg->lParam  = MAKELONG(winMsg->pt.x,winMsg->pt.y);
    225228        }
     
    422425    //Mouse messages (OS/2 Window coordinates -> Win32 coordinates relative to screen
    423426    //**************************************************************************
     427    case WM_HITTEST:
     428      winMsg->message = WINWM_NCHITTEST;
     429      winMsg->wParam  = 0;
     430      winMsg->lParam  = MAKELONG(winMsg->pt.x,winMsg->pt.y);
     431
     432      return TRUE;
     433
    424434    case WM_BUTTON1DOWN:
    425435    case WM_BUTTON1UP:
     
    432442    case WM_BUTTON3DBLCLK:
    433443        //WM_NC*BUTTON* is posted when the cursor is in a non-client area of the window
    434         hittest = win32wnd->MsgHitTest(winMsg->pt.x, winMsg->pt.y);
    435444
    436445        if(IsNCMouseMsg(win32wnd)) {
    437446            winMsg->message = WINWM_NCLBUTTONDOWN + (os2Msg->msg - WM_BUTTON1DOWN);
    438             winMsg->wParam  = hittest;
     447            winMsg->wParam  = win32wnd->getLastHitTestVal();
    439448            winMsg->lParam  = MAKELONG(winMsg->pt.x, winMsg->pt.y); //screen coordinates
    440449        }
     
    472481    {
    473482        //WM_NCMOUSEMOVE is posted when the cursor moves into a non-client area of the window
    474         hittest = win32wnd->MsgHitTest(winMsg->pt.x, winMsg->pt.y);
    475483
    476484        if(IsNCMouseMsg(win32wnd))
    477485        {
    478486          winMsg->message = WINWM_NCMOUSEMOVE;
    479           winMsg->wParam  = (WPARAM)hittest;
     487          winMsg->wParam  = (WPARAM)win32wnd->getLastHitTestVal();
    480488          winMsg->lParam  = MAKELONG(winMsg->pt.x,winMsg->pt.y);
    481489        }
     
    609617        winMsg->lParam |= (scanCode & 0x0FF) << 16;              // bit 16-23, scancode
    610618
    611         //TODO: Is this correct and complete? (how does PM differentiate between
     619        //TODO: Is this correct and complete? (how does PM differentiate between
    612620        //      i.e numeric pad pgdn & 'normal' pgdn??)
    613         //Check if it's an extended key
    614         switch(virtualKey) {
    615         case VK_RETURN_W:
    616                 //The enter key on the numeric keypad is an extended key
    617                 if(SHORT2FROMMP(os2Msg->mp2) != VK_NEWLINE)
    618                         break;
    619                 //no break
    620         case VK_LEFT_W:
    621         case VK_RIGHT_W:
    622         case VK_DOWN_W:
    623         case VK_UP_W:
    624         case VK_PRIOR_W:
    625         case VK_NEXT_W:
    626         case VK_END_W:
    627         case VK_DIVIDE_W:
    628         case VK_DELETE_W:
    629         case VK_HOME_W:
    630         case VK_INSERT_W:
    631         case VK_RCONTROL_W:
    632         case VK_RMENU_W: //is this the right alt???
    633                 winMsg->lParam = winMsg->lParam | (1<<24);
    634                 break;
    635         }
     621        //Check if it's an extended key
     622        switch(virtualKey) {
     623        case VK_RETURN_W:
     624                //The enter key on the numeric keypad is an extended key
     625                if(SHORT2FROMMP(os2Msg->mp2) != VK_NEWLINE)
     626                        break;
     627                //no break
     628        case VK_LEFT_W:
     629        case VK_RIGHT_W:
     630        case VK_DOWN_W:
     631        case VK_UP_W:
     632        case VK_PRIOR_W:
     633        case VK_NEXT_W:
     634        case VK_END_W:
     635        case VK_DIVIDE_W:
     636        case VK_DELETE_W:
     637        case VK_HOME_W:
     638        case VK_INSERT_W:
     639        case VK_RCONTROL_W:
     640        case VK_RMENU_W: //is this the right alt???
     641                winMsg->lParam = winMsg->lParam | (1<<24);
     642                break;
     643        }
    636644
    637645        if(!(SHORT1FROMMP(os2Msg->mp1) & KC_ALT))
     
    676684            if(DInputKeyBoardHandler(winMsg)) {
    677685                goto dummymessage; //dinput swallowed message
    678             }
     686            }
    679687        }
    680688        break;
     
    771779    default:
    772780dummymessage:
    773         winMsg->message = 0;
    774         winMsg->wParam  = 0;
    775         winMsg->lParam  = 0;
     781        winMsg->message = 0;
     782        winMsg->wParam  = 0;
     783        winMsg->lParam  = 0;
    776784        return FALSE;
    777785  }
Note: See TracChangeset for help on using the changeset viewer.