Ignore:
Timestamp:
Dec 29, 1999, 11:54:04 PM (26 years ago)
Author:
cbratschi
Message:

new mapping functions, fixed 1 pixel and window handle bugs

File:
1 edited

Legend:

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

    r2246 r2257  
    1 /* $Id: oslibwin.cpp,v 1.55 1999-12-29 12:39:44 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.56 1999-12-29 22:54:01 cbratschi Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    325325//******************************************************************************
    326326//******************************************************************************
    327 BOOL OSLibWinSetWindowPos(HWND hwnd, HWND hwndInsertBehind, LONG x, LONG y, LONG cx,
    328                           LONG cy, ULONG fl)
    329 {
    330  HWND hwndParent = hwndInsertBehind;
    331  BOOL rc;
    332 
    333     if(fl & SWP_MOVE) {
    334         switch(hwndParent)
    335         {
    336             case HWNDOS_TOP:
    337             case HWNDOS_BOTTOM:
    338                 hwndParent = HWND_DESKTOP;
    339                 break;
    340         }
    341         y = MapOS2ToWin32Y(hwndParent, cy, y);
    342     }
    343     rc = WinSetWindowPos(hwnd, hwndInsertBehind, x, y, cx, cy, fl);
    344     dprintf(("WinSetWindowPos %x %x %d %d %d %d %x returned %d (%x)", hwnd, hwndInsertBehind, x, y, cx, cy, fl, rc, WinGetLastError(GetThreadHAB())));
    345     return rc;
    346 }
    347 //******************************************************************************
    348 //******************************************************************************
    349327BOOL OSLibWinSetMultWindowPos(PSWP pswp, ULONG num)
    350328{
     
    383361  if(rc) {
    384362        if(RelativeTo == RELATIVE_TO_SCREEN) {
    385                 MapOS2ToWin32Rectl(OSLIB_HWND_DESKTOP, hwnd, &rectl, pRect);
     363                mapOS2ToWin32Rect(hwnd,OSLIB_HWND_DESKTOP,&rectl,pRect);
    386364        }
    387         else    MapOS2ToWin32WindowRect(&rectl, pRect);
     365        else    mapOS2ToWin32Rect(hwnd,&rectl,pRect);
    388366  }
    389367  else  memset(pRect, 0, sizeof(RECT));
     
    556534                WinMapWindowPoints(hParent, HWND_DESKTOP, &point, 1);
    557535        }
    558         point.y = OSLibQueryScreenHeight() - point.y - swpFrame.cy;
     536        point.y = ScreenHeight-point.y-swpFrame.cy;
    559537
    560538        cy = swpFrame.cy;
     
    579557
    580558    pswpOld->x  = pswp->x;
    581     pswpOld->y  = swpFrame.cy - pswp->y - pswp->cy;
     559    pswpOld->y  = swpFrame.cy-pswp->y-pswp->cy;
    582560    pswpOld->cx = pswp->cx;
    583561    pswpOld->cy = pswp->cy;
     
    643621                WinMapWindowPoints(hParent, HWND_DESKTOP, &point, 1);
    644622        }
    645         point.y = OSLibQueryScreenHeight() - point.y - cy;
     623        point.y = ScreenHeight-point.y-cy;
    646624
    647625        x  = point.x;
     
    664642
    665643    pswpOld->x  = swpClient.x;
    666     pswpOld->y  = pswp->cy - swpClient.y - swpClient.cy;
     644    pswpOld->y  = pswp->cy-swpClient.y-swpClient.cy;
    667645    pswpOld->cx = swpClient.cx;
    668646    pswpOld->cy = swpClient.cy;
     
    734712         if (!((y == 0) && (pswpOld->cy == 0)))
    735713         {
    736             y = parentHeight - y - pswpOld->cy;
     714            y = parentHeight-y-pswpOld->cy;
    737715         }
    738716      }
     
    748726         cy = pswpOld->cy;
    749727      }
    750       y  = parentHeight - y - cy;
     728      y  = parentHeight-y-cy;
    751729
    752730
     
    819797            parentHeight = OSLibGetWindowHeight(hParent);
    820798
    821             point.y = ScreenHeight - point.y - cy;
     799            point.y = ScreenHeight-point.y-cy;
    822800            WinMapWindowPoints(HWND_DESKTOP, hParent, &point, 1);
    823             point.y = parentHeight - point.y - cy;
     801            point.y = parentHeight-point.y-cy;
    824802      }
    825803      else  parentHeight = ScreenHeight;
     
    838816         cy = pswpOld->cy;
    839817      }
    840       y  = parentHeight - y - cy;
     818      y  = parentHeight-y-cy;
    841819
    842820
Note: See TracChangeset for help on using the changeset viewer.