Ignore:
Timestamp:
Jan 26, 2000, 7:02:38 PM (26 years ago)
Author:
cbratschi
Message:

refixed WM_WINDOWPOS*

File:
1 edited

Legend:

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

    r2489 r2521  
    1 /* $Id: oslibwin.cpp,v 1.63 2000-01-21 13:30:34 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.64 2000-01-26 18:02:34 cbratschi Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    9393
    9494  if (*hwndFrame) {
    95     hwndClient = WinCreateWindow (*hwndFrame,saveBits ? WIN32_STDCLASS:WIN32_STDCLASS2,
     95    hwndClient = WinCreateWindow (*hwndFrame,saveBits ? WIN32_STDCLASS2:WIN32_STDCLASS,
    9696                                  NULL, dwClientStyle, 0, 0, 0, 0,
    9797                                  *hwndFrame, HWND_TOP, FID_CLIENT, NULL, NULL);
     
    525525        point.x = swpFrame.x;
    526526        point.y = swpFrame.y;
    527         if(hParent)
     527
     528        if (hParent)
    528529        {
    529                 WinMapWindowPoints(hParent, HWND_DESKTOP, &point, 1);
     530          RECTL parentRect;
     531
     532          WinQueryWindowRect(hParent,&parentRect);
     533          parentHeight = parentRect.yTop;
     534        } else
     535        {
     536          parentHeight = ScreenHeight;
    530537        }
    531         point.y = ScreenHeight-point.y-swpFrame.cy;
     538
     539        point.y = parentHeight-point.y-swpFrame.cy;
    532540
    533541        cy = swpFrame.cy;
     
    610618    if(fuFlags & (SWP_MOVE | SWP_SIZE))
    611619    {
     620        if (hParent)
     621        {
     622          RECTL parentRect;
     623
     624          WinQueryWindowRect(hParent,&parentRect);
     625          parentHeight = parentRect.yTop;
     626        } else
     627        {
     628          parentHeight = ScreenHeight;
     629        }
     630
    612631        point.x = x;
    613         point.y = y;
    614 
    615         if(hParent)
    616         {
    617                 WinMapWindowPoints(hParent, HWND_DESKTOP, &point, 1);
    618         }
    619         point.y = ScreenHeight-point.y-cy;
     632        point.y = parentHeight-y-cy;
    620633
    621634        x  = point.x;
     
    706719         y = pswpOld->y;
    707720
    708          if (!((y == 0) && (pswpOld->cy == 0)))
    709          {
    710             y = parentHeight-y-pswpOld->cy;
    711          }
     721         y = parentHeight-y-pswpOld->cy;
    712722      }
    713723
     
    724734      y  = parentHeight-y-cy;
    725735
    726 
    727        if ((pswpOld->x == x) && (pswpOld->y == y))
     736      if ((pswpOld->x == x) && (pswpOld->y == y))
    728737         flags &= ~SWP_MOVE;
    729738
     
    757766   UINT fuFlags         = pwpos->flags;
    758767   ULONG parentHeight;
    759    POINTL point;
    760768
    761769   HWND  hWinAfter;
     
    787795   if (flags & (SWP_MOVE | SWP_SIZE))
    788796   {
    789       point.x = x;
    790       point.y = y;
    791 
    792       if(hParent) {
    793             parentHeight = OSLibGetWindowHeight(hParent);
    794 
    795             point.y = ScreenHeight-point.y-cy;
    796             WinMapWindowPoints(HWND_DESKTOP, hParent, &point, 1);
    797             point.y = parentHeight-point.y-cy;
     797      if (hParent)
     798      {
     799        RECTL parentRect;
     800
     801        WinQueryWindowRect(hParent,&parentRect);
     802        parentHeight = parentRect.yTop;
     803      } else
     804      {
     805        parentHeight = ScreenHeight;
    798806      }
    799       else  parentHeight = ScreenHeight;
    800 
    801       x  = point.x;
    802       y  = point.y;
    803807
    804808      if (flags & SWP_SIZE)
     
    814818      y  = parentHeight-y-cy;
    815819
    816 
    817        if ((pswpOld->x == x) && (pswpOld->y == y))
     820      if ((pswpOld->x == x) && (pswpOld->y == y))
    818821         flags &= ~SWP_MOVE;
    819822
Note: See TracChangeset for help on using the changeset viewer.