Ignore:
Timestamp:
Dec 26, 1999, 6:30:20 PM (26 years ago)
Author:
cbratschi
Message:

non-client fixes, DefWndProc enhancements, several other bugs fixed

File:
1 edited

Legend:

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

    r2200 r2204  
    1 /* $Id: oslibmsgtranslate.cpp,v 1.1 1999-12-24 18:42:46 sandervl Exp $ */
     1/* $Id: oslibmsgtranslate.cpp,v 1.2 1999-12-26 17:30:15 cbratschi Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    283283        if(win32wnd->lastHitTestVal != HTCLIENT_W) {
    284284            winMsg->message = WINWM_NCLBUTTONDOWN + (os2Msg->msg - WM_BUTTON1DOWN);
     285            winMsg->wParam = win32wnd->lastHitTestVal;
    285286            winMsg->lParam  = MAKELONG(winMsg->pt.x, winMsg->pt.y); //screen coordinates
    286287        }
     
    324325
    325326        //WM_NCMOUSEMOVE is posted when the cursor moves into a non-client area of the window
    326         if(win32wnd->lastHitTestVal != HTCLIENT_W) {
    327                 setcursormsg   = WINWM_NCMOUSEMOVE;
    328                 winMsg->wParam = (WPARAM)win32wnd->lastHitTestVal;
    329         }
    330         else    winMsg->wParam = (WPARAM)keystate;
     327        if(win32wnd->lastHitTestVal != HTCLIENT_W)
     328        {
     329          setcursormsg   = WINWM_NCMOUSEMOVE;
     330          winMsg->wParam = (WPARAM)win32wnd->lastHitTestVal;
     331          winMsg->lParam = MAKELONG(winMsg->pt.x,winMsg->pt.y);
     332        } else
     333        {
     334          winMsg->wParam = (WPARAM)keystate;
     335          winMsg->lParam  = MAKELONG(SHORT1FROMMP(os2Msg->mp1), MapOS2ToWin32Y(win32wnd, SHORT2FROMMP(os2Msg->mp1)));
     336        }
    331337        //OS/2 Window coordinates -> Win32 Window coordinates
    332338        winMsg->message = setcursormsg;
    333         winMsg->lParam  = MAKELONG(SHORT1FROMMP(os2Msg->mp1), MapOS2ToWin32Y(win32wnd, SHORT2FROMMP(os2Msg->mp1)));
    334339        break;
    335340    }
    336341
    337342    case WM_CONTROL:
     343      goto dummymessage;
     344
    338345    case WM_COMMAND:
    339346        if(SHORT1FROMMP(os2Msg->mp2) == CMDSRC_MENU) {
     
    511518          }
    512519        }
    513         goto dummymessage;
     520        goto dummymessage; //for caret blinking
    514521
    515522    case WM_SETWINDOWPARAMS:
     
    556563
    557564    case WM_HITTEST:
    558         // Only send this message if the window is enabled
    559         if (WinIsWindowEnabled(os2Msg->hwnd))
    560         {
    561             OSLIBPOINT pt;
    562             pt.x = (*(POINTS *)&os2Msg->mp1).x;
    563             pt.y = (*(POINTS *)&os2Msg->mp1).y;
    564             MapOS2ToWin32Point( OSLIB_HWND_DESKTOP, os2Msg->hwnd, &pt);
    565             winMsg->message = WINWM_NCHITTEST;
    566             winMsg->lParam  = MAKELONG((USHORT)pt.x, (USHORT)pt.y);
    567             break;
    568         }
    569         goto dummymessage;
     565    {
     566        OSLIBPOINT pt;
     567
     568        pt.x = (*(POINTS *)&os2Msg->mp1).x;
     569        pt.y = (*(POINTS *)&os2Msg->mp1).y;
     570
     571        MapOS2ToWin32Point(OSLIB_HWND_DESKTOP,os2Msg->hwnd,&pt);
     572        winMsg->message = WINWM_NCHITTEST;
     573        winMsg->wParam  = 0;
     574        winMsg->lParam  = MAKELONG((USHORT)pt.x, (USHORT)pt.y);
     575        break;
     576    }
    570577
    571578    case WM_CONTEXTMENU:
Note: See TracChangeset for help on using the changeset viewer.