Ignore:
Timestamp:
Aug 27, 1999, 7:50:57 PM (26 years ago)
Author:
dengert
Message:

window creation, positioning, sizing

File:
1 edited

Legend:

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

    r693 r715  
    1 /* $Id: win32wnd.cpp,v 1.30 1999-08-25 15:08:50 dengert Exp $ */
     1/* $Id: win32wnd.cpp,v 1.31 1999-08-27 17:50:56 dengert Exp $ */
    22/*
    33 * Win32 Window Code for OS/2
     
    256256  {
    257257        SetParent(cs->hwndParent);
     258        owner = GetWindowFromHandle(cs->hwndParent);
     259        if(owner == NULL)
     260        {
     261            dprintf(("HMHandleTranslateToOS2 couldn't find owner window %x!!!", cs->hwndParent));
     262            return FALSE;
     263        }
    258264  }
    259265  else
     
    367373  OS2Hwnd = OSLibWinCreateWindow((getParent()) ? getParent()->getOS2WindowHandle() : OSLIB_HWND_DESKTOP,
    368374                                 dwOSWinStyle, dwOSFrameStyle, (char *)cs->lpszName,
    369                                  (owner) ? owner->getOS2FrameWindowHandle() : OSLIB_HWND_DESKTOP,
     375                                 (owner) ? owner->getOS2WindowHandle() : OSLIB_HWND_DESKTOP,
    370376                                 (hwndLinkAfter == HWND_BOTTOM) ? TRUE : FALSE,
    371377                                 &OS2HwndFrame);
     
    10681074
    10691075        if (!(wpos->flags & SWP_NOCLIENTMOVE))
    1070             SendMessageA(WM_MOVE, 0, MAKELONG(wpos->x, wpos->y));
     1076            SendMessageA(WM_MOVE, 0, MAKELONG(rectClient.left, rectClient.top));
    10711077
    10721078        if (!(wpos->flags & SWP_NOCLIENTSIZE))
     
    10751081            else if (dwStyle & WS_MINIMIZE) wp = SIZE_MINIMIZED;
    10761082
    1077             SendMessageA(WM_SIZE, wp, MAKELONG(wpos->cx,wpos->cy));
     1083           SendMessageA(WM_SIZE, wp, MAKELONG(rectClient.right  - rectClient.left,
     1084                                              rectClient.bottom - rectClient.top));
    10781085        }
    10791086        return 0;
     
    14691476   BOOL rc = FALSE;
    14701477   Win32Window *window;
     1478   HWND hParent = 0;
    14711479
    14721480   dprintf (("SetWindowPos %x %x (%d,%d)(%d,%d) %x", Win32Hwnd, hwndInsertAfter, x, y, cx, cy, fuFlags));
     
    14841492   WINDOWPOS wpos;
    14851493   SWP swp, swpOld;
    1486    ULONG parentHeight;
    14871494
    14881495   //****************************
     
    15011508   //**********************************************
    15021509   if(~fuFlags & (SWP_NOMOVE | SWP_NOSIZE)) {
    1503        OSLibWinQueryWindowPos(OS2Hwnd, &swpOld);
    1504        parentHeight = isChild() ?
    1505            OSLibGetWindowHeight(getParent()->getOS2WindowHandle())
    1506          : OSLibQueryScreenHeight();
     1510       if (isChild())
     1511       {
     1512           hParent = getParent()->getOS2WindowHandle();
     1513           OSLibWinQueryWindowPos(OS2Hwnd, &swpOld);
     1514       } else
     1515           OSLibWinQueryWindowPos(OS2HwndFrame, &swpOld);
    15071516   }
    1508    OSLibMapWINDOWPOStoSWP(&wpos, &swp, &swpOld, parentHeight);
     1517   OSLibMapWINDOWPOStoSWP(&wpos, &swp, &swpOld, hParent, OS2HwndFrame);
    15091518
    15101519   /* MapSWP can clear the SWP_MOVE and SWP_SIZE flags if the window is not
Note: See TracChangeset for help on using the changeset viewer.