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/window.cpp

    r1036 r1039  
    1 /* $Id: window.cpp,v 1.7 1999-09-24 22:45:28 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.8 1999-09-25 09:27:08 dengert Exp $ */
    22/*
    33 * Win32 window apis for OS/2
    44 *
    55 * Copyright 1999 Sander van Leeuwen
     6 * Copyright 1999 Daniela Engert (dani@ngrt.de)
    67 *
    78 * Parts based on Wine Windows code (windows\win.c)
     
    778779//******************************************************************************
    779780//******************************************************************************
    780 BOOL WIN32API ClientToScreen( HWND arg1, PPOINT  arg2)
    781 {
    782 #ifdef DEBUG
    783 ////    WriteLog("USER32:  ClientToScreen\n");
    784 #endif
    785     return O32_ClientToScreen(arg1, arg2);
     781BOOL WIN32API ClientToScreen (HWND hwnd, PPOINT pt)
     782{
     783#ifdef DEBUG
     784   WriteLog("USER32:  ClientToScreen\n");
     785#endif
     786    Win32BaseWindow *wnd;
     787    PRECT rcl;
     788
     789    if (!hwnd) return (TRUE);
     790    wnd = Win32BaseWindow::GetWindowFromHandle (hwnd);
     791    if (!wnd) return (TRUE);
     792
     793    rcl  = wnd->getClientRect();
     794    pt->y = (rcl->bottom - rcl->top) - pt->y;
     795    OSLibWinMapWindowPoints (wnd->getOS2WindowHandle(), OSLIB_HWND_DESKTOP, (OSLIBPOINT *)pt, 1);
     796    pt->y = ScreenHeight - pt->y;
     797    return (TRUE);
    786798}
    787799//******************************************************************************
     
    11521164//******************************************************************************
    11531165//******************************************************************************
     1166
Note: See TracChangeset for help on using the changeset viewer.