Ignore:
Timestamp:
Sep 25, 1999, 11:27:08 AM (26 years ago)
Author:
dengert
Message:

fixed ClientToScreen adn ScreenToClient

File:
1 edited

Legend:

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

    r1036 r1039  
    1 /* $Id: user32.cpp,v 1.29 1999-09-24 22:45:27 sandervl Exp $ */
     1/* $Id: user32.cpp,v 1.30 1999-09-25 09:27:08 dengert Exp $ */
    22
    33/*
     
    12421242//******************************************************************************
    12431243//******************************************************************************
    1244 BOOL WIN32API ScreenToClient( HWND arg1, LPPOINT  arg2)
     1244BOOL WIN32API ScreenToClient (HWND hwnd, LPPOINT pt)
    12451245{
    12461246#ifdef DEBUG
    12471247    WriteLog("USER32:  ScreenToClient\n");
    12481248#endif
    1249     return O32_ScreenToClient(arg1, arg2);
     1249    Win32BaseWindow *wnd;
     1250    PRECT rcl;
     1251
     1252    if (!hwnd) return (TRUE);
     1253    wnd = Win32BaseWindow::GetWindowFromHandle (hwnd);
     1254    if (!wnd) return (TRUE);
     1255
     1256    rcl   = wnd->getClientRect();
     1257    pt->y = ScreenHeight - pt->y;
     1258    OSLibWinMapWindowPoints (OSLIB_HWND_DESKTOP, wnd->getOS2WindowHandle(), (OSLIBPOINT *)pt, 1);
     1259    pt->y = (rcl->bottom - rcl->top) - pt->y;
     1260    return (TRUE);
    12501261}
    12511262//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.