Ignore:
Timestamp:
Jun 10, 2001, 2:05:41 PM (24 years ago)
Author:
sandervl
Message:

bugfixes + os/2 look support added

File:
1 edited

Legend:

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

    r5950 r5951  
    1 /* $Id: win32wbase.cpp,v 1.261 2001-06-10 09:19:58 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.262 2001-06-10 12:05:40 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    469469    teb->o.odin.newWindow = (ULONG)this;
    470470
    471     DWORD dwOSWinStyle;
    472 
    473     OSLibWinConvertStyle(dwStyle,dwExStyle,&dwOSWinStyle);
     471    DWORD dwOSWinStyle, dwOSFrameStyle;
     472
     473    OSLibWinConvertStyle(dwStyle,dwExStyle,&dwOSWinStyle, &dwOSFrameStyle);
    474474
    475475    OS2Hwnd = OSLibWinCreateWindow((getParent()) ? getParent()->getOS2WindowHandle() : OSLIB_HWND_DESKTOP,
    476                                    dwOSWinStyle,(char *)windowNameA,
     476                                   dwOSWinStyle, dwOSFrameStyle, (char *)windowNameA,
    477477                                   (owner) ? owner->getOS2WindowHandle() : ((getParent()) ? getParent()->getOS2WindowHandle() : OSLIB_HWND_DESKTOP),
    478478                                   (hwndLinkAfter == HWND_BOTTOM) ? TRUE : FALSE,
     
    582582                windowNameA[0] = 0;
    583583            }
     584        }
     585        if(fOS2Look) {
     586            OSLibWinSetTitleBarText(OS2HwndFrame, windowNameA);
    584587        }
    585588    }
     
    12021205  }
    12031206#endif
     1207  if(fOS2Look && ((dwStyle & WS_CAPTION) == WS_CAPTION))
     1208  {
     1209      RECT rect = {0};
     1210      int  height  = getWindowHeight();
     1211      RECTLOS2 rectOS2;
     1212
     1213      AdjustRectOuter(&rect, FALSE);
     1214
     1215      rect.left   = -rect.left;
     1216      rect.top    = rect.bottom - rect.top;
     1217      rect.right  = rectWindow.right - rectWindow.left - rect.right;
     1218 
     1219      rectOS2.xLeft   = rect.left;
     1220      rectOS2.xRight  = rect.right;
     1221      rectOS2.yBottom = height - rect.top;
     1222      rectOS2.yTop    = height - rect.bottom;
     1223      OSLibWinPositionFrameControls(getOS2FrameWindowHandle(), &rectOS2);
     1224  }
    12041225  return rc;
    12051226}
     
    14231444            if(hTaskList) {
    14241445                OSLibWinChangeTaskList(hTaskList, OS2HwndFrame, getWindowNameA(), (getStyle() & WS_VISIBLE) ? 1 : 0);
     1446                if(fOS2Look) {
     1447                    OSLibWinSetTitleBarText(OS2HwndFrame, getWindowNameA());
     1448                }
    14251449            }
    14261450        }
     
    19131937            if(hTaskList) {
    19141938                OSLibWinChangeTaskList(hTaskList, OS2HwndFrame, getWindowNameA(), (getStyle() & WS_VISIBLE) ? 1 : 0);
     1939                if(fOS2Look) {
     1940                    OSLibWinSetTitleBarText(OS2HwndFrame, getWindowNameA());
     1941                }
    19151942            }
    19161943        }
     
    27662793   }
    27672794   else {
     2795        if(newparent) RELEASE_WNDOBJ(newparent);
     2796
    27682797        setParent(windowDesktop);
     2798        windowDesktop->addRef();
    27692799        windowDesktop->addChild(this);
    27702800        OSLibWinSetParent(getOS2FrameWindowHandle(), OSLIB_HWND_DESKTOP);
     
    36513681    if(HwGetWindowHandleData(hwnd, (DWORD *)&window) == TRUE) {
    36523682         if(window) {
    3653              dprintf(("addRef %x; refcount %d", hwnd, window->getRefCount()+1));
     3683////             dprintf(("addRef %x; refcount %d", hwnd, window->getRefCount()+1));
    36543684             window->addRef();
    36553685         }
Note: See TracChangeset for help on using the changeset viewer.