Ignore:
Timestamp:
Oct 24, 1999, 1:05:05 AM (26 years ago)
Author:
sandervl
Message:

Combobox + windowpos changes + fixes

Location:
trunk/src/user32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32

    • Property svn:ignore set to
      user32.lrf
      user32exp.def
      resource.asm
  • trunk/src/user32/oslibwin.cpp

    r1405 r1425  
    1 /* $Id: oslibwin.cpp,v 1.34 1999-10-22 18:11:45 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.35 1999-10-23 23:04:35 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    512512    WinQueryWindowPos(hFrame, &swpFrame);
    513513
    514     if ( fuFlags & SWP_NOADJUST) {
    515         WinQueryWindowPos(WinWindowFromID(hFrame, FID_CLIENT), &swpClient);
    516         x  = swpClient.x;
    517         cx = swpClient.cx;
    518         y  = swpClient.y;
    519         cy = swpClient.cy;
    520     }
    521 
    522514    if(fuFlags & (SWP_MOVE | SWP_SIZE))
    523515    {
     
    709701         }
    710702      }
     703
     704      if (flags & SWP_SIZE)
     705      {
     706         if (cy != pswpOld->cy)
     707            flags |= SWP_MOVE;
     708      }
     709      else
     710      {
     711         cx = pswpOld->cx;
     712         cy = pswpOld->cy;
     713      }
     714      y  = parentHeight - y - cy;
     715
     716
     717       if ((pswpOld->x == x) && (pswpOld->y == y))
     718         flags &= ~SWP_MOVE;
     719
     720      if ((pswpOld->cx == cx) && (pswpOld->cy == cy))
     721         flags &= ~SWP_SIZE;
     722   }
     723
     724   pswp->fl               = flags;
     725   pswp->cy               = cy;
     726   pswp->cx               = cx;
     727   pswp->x                = x;
     728   pswp->y                = y;
     729   pswp->hwndInsertBehind = hWinAfter;
     730   pswp->hwnd             = hWindow;
     731   pswp->ulReserved1      = 0;
     732   pswp->ulReserved2      = 0;
     733}
     734//******************************************************************************
     735//Position in screen coordinates
     736//******************************************************************************
     737void OSLibMapWINDOWPOStoSWPFrame(PWINDOWPOS pwpos, PSWP pswp, PSWP pswpOld, HWND hParent, HWND hFrame)
     738{
     739 BOOL fCvt = FALSE;
     740
     741   HWND hWnd            = pwpos->hwnd;
     742   HWND hWndInsertAfter = pwpos->hwndInsertAfter;
     743   long x               = pwpos->x;
     744   long y               = pwpos->y;
     745   long cx              = pwpos->cx;
     746   long cy              = pwpos->cy;
     747   UINT fuFlags         = pwpos->flags;
     748   ULONG parentHeight;
     749   POINTL point;
     750
     751   HWND  hWinAfter;
     752   ULONG flags = 0;
     753   HWND  hWindow = hWnd ? (HWND)hWnd : HWND_DESKTOP;
     754
     755   if (hWndInsertAfter == HWND_TOPMOST_W)
     756//      hWinAfter = HWND_TOPMOST;
     757      hWinAfter = HWND_TOP;
     758   else if (hWndInsertAfter == HWND_NOTOPMOST_W)
     759//      hWinAfter = HWND_NOTOPMOST;
     760      hWinAfter = HWND_TOP;
     761   else if (hWndInsertAfter == HWND_TOP_W)
     762      hWinAfter = HWND_TOP;
     763   else if (hWndInsertAfter == HWND_BOTTOM_W)
     764      hWinAfter = HWND_BOTTOM;
     765   else
     766      hWinAfter = (HWND) hWndInsertAfter;
     767
     768   if (!(fuFlags & SWP_NOSIZE_W    )) flags |= SWP_SIZE;
     769   if (!(fuFlags & SWP_NOMOVE_W    )) flags |= SWP_MOVE;
     770   if (!(fuFlags & SWP_NOZORDER_W  )) flags |= SWP_ZORDER;
     771   if (  fuFlags & SWP_NOREDRAW_W  )  flags |= SWP_NOREDRAW;
     772   if (!(fuFlags & SWP_NOACTIVATE_W)) flags |= SWP_ACTIVATE;
     773   if (  fuFlags & SWP_SHOWWINDOW_W)  flags |= SWP_SHOW;
     774   if (  fuFlags & SWP_HIDEWINDOW_W)  flags |= SWP_HIDE;
     775   if (  fuFlags & SWP_NOSENDCHANGING_W) flags |= SWP_NOADJUST;
     776
     777   if (flags & (SWP_MOVE | SWP_SIZE))
     778   {
     779      point.x = x;
     780      point.y = y;
     781
     782      if(hParent) {
     783            parentHeight = OSLibGetWindowHeight(hParent);
     784
     785            point.y = ScreenHeight - point.y - cy;
     786            WinMapWindowPoints(HWND_DESKTOP, hParent, &point, 1);
     787            point.y = parentHeight - point.y - cy;
     788      }
     789      else  parentHeight = ScreenHeight;
     790
     791      x  = point.x;
     792      y  = point.y;
    711793
    712794      if (flags & SWP_SIZE)
Note: See TracChangeset for help on using the changeset viewer.