Ignore:
Timestamp:
Jun 13, 2001, 12:29:46 PM (24 years ago)
Author:
sandervl
Message:

OS/2 looks changes + fixes

File:
1 edited

Legend:

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

    r5989 r5993  
    1 /* $Id: oslibwin.cpp,v 1.99 2001-06-13 08:19:34 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.100 2001-06-13 10:29:44 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    123123      if((dwStyle & WS_CAPTION_W) == WS_CAPTION_W) {
    124124          *OSFrameStyle = FCF_TITLEBAR;
    125           if(dwStyle & WS_SYSMENU_W)
     125          if((dwStyle & WS_SYSMENU_W) && !(dwExStyle & WS_EX_TOOLWINDOW_W))
    126126          {
    127127              *OSFrameStyle |= FCF_SYSMENU;
     
    130130              *OSFrameStyle |= FCF_MINMAX;
    131131          }
     132          else
     133          if(dwStyle & WS_SYSMENU_W) {
     134              *OSFrameStyle |= FCF_CLOSEBUTTON;
     135          }
    132136      }
    133137  }
     
    136140//******************************************************************************
    137141//******************************************************************************
    138 BOOL OSLibWinPositionFrameControls(HWND hwndFrame, RECTLOS2 *pRect)
     142BOOL OSLibWinPositionFrameControls(HWND hwndFrame, RECTLOS2 *pRect, DWORD dwStyle,
     143                                   DWORD dwExStyle, HICON hSysMenuIcon)
    139144{
    140145  SWP  swp[3];
     
    149154  }
    150155
     156#if 0
    151157  hwndControl = WinWindowFromID(hwndFrame, FID_SYSMENU);
    152158  if(hwndControl) {
     
    165171      i++;
    166172  }
    167   hwndControl = WinWindowFromID(hwndFrame, FID_TITLEBAR);
    168   if(hwndControl) {
    169       swp[i].hwnd = hwndControl;
    170       swp[i].hwndInsertBehind = HWND_TOP;
    171       swp[i].x  = pRect->xLeft;
    172       swp[i].y  = pRect->yBottom;
    173       if(pRect->yTop - pRect->yBottom > minmaxheight) {
    174           swp[i].y += pRect->yTop - pRect->yBottom - minmaxheight;
     173#else
     174  if((dwStyle & WS_SYSMENU_W) && !(dwExStyle & WS_EX_TOOLWINDOW_W) && hSysMenuIcon) {
     175      pRect->xLeft += minmaxwidth/2;
     176  }
     177#endif
     178  if((dwStyle & WS_CAPTION_W) == WS_CAPTION_W) {
     179      hwndControl = WinWindowFromID(hwndFrame, FID_TITLEBAR);
     180      if(hwndControl) {
     181          swp[i].hwnd = hwndControl;
     182          swp[i].hwndInsertBehind = HWND_TOP;
     183          swp[i].x  = pRect->xLeft;
     184          swp[i].y  = pRect->yBottom;
     185          if(pRect->yTop - pRect->yBottom > minmaxheight) {
     186              swp[i].y += pRect->yTop - pRect->yBottom - minmaxheight;
     187          }
     188          swp[i].cx = pRect->xRight - pRect->xLeft;
     189          if((dwStyle & WS_MINIMIZEBOX_W) || (dwStyle & WS_MAXIMIZEBOX_W)) {
     190              swp[i].cx -= minmaxwidth;
     191          }
     192          if(dwStyle & WS_SYSMENU_W) {
     193              swp[i].cx -= minmaxwidth/2;
     194          }
     195          swp[i].cy = minmaxheight;
     196          swp[i].fl = SWP_SIZE | SWP_MOVE | SWP_SHOW;
     197          dprintf(("FID_TITLEBAR (%d,%d)(%d,%d)", swp[i].x, swp[i].y, swp[i].cx, swp[i].cy));
     198          pRect->xLeft += swp[i].cx;
     199          i++;
    175200      }
    176       swp[i].cx = pRect->xRight - pRect->xLeft;
    177       if(WinWindowFromID(hwndFrame, FID_MINMAX)) {
    178           swp[i].cx -= (minmaxwidth + minmaxwidth/2);
     201  }
     202  if((dwStyle & WS_MINIMIZEBOX_W) || (dwStyle & WS_MAXIMIZEBOX_W) || (dwStyle & WS_SYSMENU_W)) {
     203      hwndControl = WinWindowFromID(hwndFrame, FID_MINMAX);
     204      if(hwndControl) {
     205          swp[i].hwnd = hwndControl;
     206          swp[i].hwndInsertBehind = HWND_TOP;
     207          swp[i].x  = pRect->xLeft;
     208          swp[i].y  = pRect->yBottom;
     209          if(pRect->yTop - pRect->yBottom > minmaxheight) {
     210              swp[i].y += pRect->yTop - pRect->yBottom - minmaxheight;
     211          }
     212          swp[i].cx = 0;
     213          if((dwStyle & WS_MINIMIZEBOX_W) || (dwStyle & WS_MAXIMIZEBOX_W)) {
     214              swp[i].cx += minmaxwidth;
     215          }
     216          if(dwStyle & WS_SYSMENU_W) {
     217              swp[i].cx += minmaxwidth/2;
     218          }
     219          swp[i].cy = minmaxheight;
     220          swp[i].fl = SWP_SIZE | SWP_MOVE | SWP_SHOW;
     221          dprintf(("FID_MINMAX (%d,%d)(%d,%d)", swp[i].x, swp[i].y, swp[i].cx, swp[i].cy));
     222          pRect->xLeft += swp[i].cx;
     223          i++;
    179224      }
    180       swp[i].cy = minmaxheight;
    181       swp[i].fl = SWP_SIZE | SWP_MOVE | SWP_SHOW;
    182       dprintf(("FID_TITLEBAR (%d,%d)(%d,%d)", swp[i].x, swp[i].y, swp[i].cx, swp[i].cy));
    183       pRect->xLeft += swp[i].cx;
    184       i++;
    185   }
    186   hwndControl = WinWindowFromID(hwndFrame, FID_MINMAX);
    187   if(hwndControl) {
    188       swp[i].hwnd = hwndControl;
    189       swp[i].hwndInsertBehind = HWND_TOP;
    190       swp[i].x  = pRect->xLeft;
    191       swp[i].y  = pRect->yBottom;
    192       if(pRect->yTop - pRect->yBottom > minmaxheight) {
    193           swp[i].y += pRect->yTop - pRect->yBottom - minmaxheight;
    194       }
    195       swp[i].cx = minmaxwidth + minmaxwidth/2;
    196       swp[i].cy = minmaxheight;
    197       swp[i].fl = SWP_SIZE | SWP_MOVE | SWP_SHOW;
    198       dprintf(("FID_MINMAX (%d,%d)(%d,%d)", swp[i].x, swp[i].y, swp[i].cx, swp[i].cy));
    199       pRect->xLeft += swp[i].cx;
    200       i++;
    201225  }
    202226  return WinSetMultWindowPos(GetThreadHAB(), swp, i);
Note: See TracChangeset for help on using the changeset viewer.