Ignore:
Timestamp:
Oct 11, 1999, 6:04:52 PM (26 years ago)
Author:
cbratschi
Message:

pmframe finished

File:
1 edited

Legend:

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

    r1245 r1248  
    1 /* $Id: win32wbase.cpp,v 1.34 1999-10-11 15:26:05 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.35 1999-10-11 16:04:51 cbratschi Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    432432  DWORD dwOSWinStyle, dwOSFrameStyle;
    433433
    434   OSLibWinConvertStyle(cs->style, cs->dwExStyle, &dwOSWinStyle, &dwOSFrameStyle, &borderWidth, &borderHeight);
     434  OSLibWinConvertStyle(cs->style, &cs->dwExStyle, &dwOSWinStyle, &dwOSFrameStyle, &borderWidth, &borderHeight);
     435  dwExStyle = cs->dwExStyle;
    435436
    436437//CB: dwOSFrameStyle handled by OSLibWinConvertStyle
     
    532533                     rectClient.right-rectClient.left,
    533534                     rectClient.bottom-rectClient.top,
    534                      SWP_NOACTIVATE | SWP_NOZORDER);
     535                     SWP_NOACTIVATE | SWP_NOZORDER );
    535536  }
    536537  else {
     
    540541                     SWP_NOACTIVATE);
    541542  }
     543
    542544  //Subclass frame
    543 
    544545  if (isFrameWindow())
    545546  {
    546547    pOldFrameProc = FrameSubclassFrameWindow(this);
    547     if (dwStyle & WS_CHILD && HAS_3DFRAME(dwExStyle)) FrameSetBorderSize(this);
     548    if (isChild()) FrameSetBorderSize(this,TRUE);
    548549  }
    549550
     
    14561457    if( ctlType == CTLCOLOR_SCROLLBAR)
    14571458    {
    1458             HBRUSH hb = GetSysColorBrush(COLOR_SCROLLBAR);
     1459            HBRUSH hb = GetSysColorBrush(COLOR_SCROLLBAR);
    14591460        COLORREF bk = GetSysColor(COLOR_3DHILIGHT);
    14601461        SetTextColor( hdc, GetSysColor(COLOR_3DFACE));
     
    14711472        }
    14721473#endif
    1473         UnrealizeObject( hb );
     1474        UnrealizeObject( hb );
    14741475        return (LRESULT)hb;
    14751476    }
     
    14771478    SetTextColor( hdc, GetSysColor(COLOR_WINDOWTEXT));
    14781479
    1479         if ((ctlType == CTLCOLOR_EDIT) || (ctlType == CTLCOLOR_LISTBOX))
    1480         {
    1481             SetBkColor( hdc, GetSysColor(COLOR_WINDOW) );
    1482         }
    1483         else
    1484         {
    1485             SetBkColor( hdc, GetSysColor(COLOR_3DFACE) );
    1486             return (LRESULT)GetSysColorBrush(COLOR_3DFACE);
    1487         }
     1480        if ((ctlType == CTLCOLOR_EDIT) || (ctlType == CTLCOLOR_LISTBOX))
     1481        {
     1482            SetBkColor( hdc, GetSysColor(COLOR_WINDOW) );
     1483        }
     1484        else
     1485        {
     1486            SetBkColor( hdc, GetSysColor(COLOR_3DFACE) );
     1487            return (LRESULT)GetSysColorBrush(COLOR_3DFACE);
     1488        }
    14881489    return (LRESULT)GetSysColorBrush(COLOR_WINDOW);
    14891490}
     
    15311532
    15321533    case WM_CTLCOLOR:
    1533             return DefWndControlColor(HIWORD(lParam), (HDC)wParam);
     1534            return DefWndControlColor(HIWORD(lParam), (HDC)wParam);
    15341535
    15351536    case WM_VKEYTOITEM:
    15361537    case WM_CHARTOITEM:
    1537              return -1;
     1538             return -1;
    15381539
    15391540    case WM_PARENTNOTIFY:
     
    19671968    dprintf(("ShowWindow %x", nCmdShow));
    19681969    if(fFirstShow) {
    1969         if(isFrameWindow() && IS_OVERLAPPED(getStyle())) {
     1970        if(isFrameWindow() && IS_OVERLAPPED(getStyle()) && !isChild()) {
    19701971                SendMessageA(WM_SIZE, SIZE_RESTORED,
    19711972                                MAKELONG(rectClient.right-rectClient.left,
     
    20472048       {
    20482049           hParent = getParent()->getOS2WindowHandle();
    2049            OSLibWinQueryWindowPos(OS2Hwnd, &swpOld);
     2050           OSLibWinQueryWindowPos(isFrameWindow() ? OS2HwndFrame:OS2Hwnd, &swpOld);
    20502051       }
    20512052       else
     
    20642065   if (isFrameWindow())
    20652066   {
    2066       POINT maxSize, maxPos, minTrack, maxTrack;
    2067 
    2068       GetMinMaxInfo(&maxSize, &maxPos, &minTrack, &maxTrack);
    2069 
    2070       if (swp.cx > maxTrack.x) swp.cx = maxTrack.x;
    2071       if (swp.cy > maxTrack.y) swp.cy = maxTrack.y;
    2072       if (swp.cx < minTrack.x) swp.cx = minTrack.x;
    2073       if (swp.cy < minTrack.y) swp.cy = minTrack.y;
     2067      if (!isChild())
     2068      {
     2069        POINT maxSize, maxPos, minTrack, maxTrack;
     2070
     2071        GetMinMaxInfo(&maxSize, &maxPos, &minTrack, &maxTrack);
     2072
     2073        if (swp.cx > maxTrack.x) swp.cx = maxTrack.x;
     2074        if (swp.cy > maxTrack.y) swp.cy = maxTrack.y;
     2075        if (swp.cx < minTrack.x) swp.cx = minTrack.x;
     2076        if (swp.cy < minTrack.y) swp.cy = minTrack.y;
     2077      }
    20742078
    20752079      swp.hwnd = OS2HwndFrame;
     
    26022606Win32BaseWindow *Win32BaseWindow::GetWindowFromOS2FrameHandle(HWND hwnd)
    26032607{
    2604  Win32BaseWindow *win32wnd;
    2605  DWORD        magic;
    2606 
    26072608  return GetWindowFromOS2Handle(OSLibWinWindowFromID(hwnd,OSLIB_FID_CLIENT));
    2608 
    2609   //CB: doesn't work with frame window words
    2610 /*
    2611   win32wnd = (Win32BaseWindow *)OSLibWinGetWindowULong(hwnd, OFFSET_WIN32WNDPTR);
    2612   magic    = OSLibWinGetWindowULong(hwnd, OFFSET_WIN32PM_MAGIC);
    2613 
    2614   if(win32wnd && CheckMagicDword(magic)) {
    2615         return win32wnd;
    2616   }
    2617   return 0;
    2618 */
    26192609}
    26202610//******************************************************************************
     
    26462636//******************************************************************************
    26472637//******************************************************************************
     2638
    26482639GenericObject *Win32BaseWindow::windows  = NULL;
Note: See TracChangeset for help on using the changeset viewer.