Ignore:
Timestamp:
Nov 14, 1999, 1:00:01 PM (26 years ago)
Author:
sandervl
Message:

WindowFromPoint fix + GetMenuItemRect implemented

File:
1 edited

Legend:

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

    r1704 r1732  
    1 /* $Id: window.cpp,v 1.34 1999-11-11 13:17:32 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.35 1999-11-14 12:00:01 sandervl Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    12471247HWND WIN32API WindowFromPoint( POINT point)
    12481248{
    1249  HWND hwnd;
    1250 
    1251     dprintf(("WindowFromPoint (%d,%d)\n", point.x, point.y));
    1252     hwnd = OSLibWinWindowFromPoint(OSLIB_HWND_DESKTOP, (PVOID)&point);
    1253     if(hwnd) {
    1254         return Win32BaseWindow::OS2ToWin32Handle(hwnd);
    1255     }
    1256     return 0;
     1249    HWND  hwndOS2, hwnd;
     1250    POINT wPoint;
     1251
     1252
     1253    wPoint.x = point.x;
     1254    wPoint.y = windowDesktop->getWindowHeight() - point.y;
     1255
     1256    hwndOS2 = OSLibWinWindowFromPoint(OSLIB_HWND_DESKTOP, (PVOID)&wPoint);
     1257    if(hwndOS2) {
     1258        hwnd = Win32BaseWindow::OS2ToWin32Handle(hwndOS2);
     1259        if(hwnd) {
     1260                dprintf(("WindowFromPoint (%d,%d) %x->%x\n", point.x, point.y, hwndOS2, hwnd));
     1261                return hwnd;
     1262        }
     1263    }
     1264    dprintf(("WindowFromPoint (%d,%d) %x->1\n", point.x, point.y, hwndOS2));
     1265    return 1;
    12571266}
    12581267//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.