Ignore:
Timestamp:
Mar 18, 2000, 5:13:41 PM (25 years ago)
Author:
cbratschi
Message:

merged with Corel 20000317, small icon

File:
1 edited

Legend:

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

    r3144 r3153  
    1 /* $Id: win32wbase.cpp,v 1.173 2000-03-17 17:12:08 cbratschi Exp $ */
     1/* $Id: win32wbase.cpp,v 1.174 2000-03-18 16:13:38 cbratschi Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    253253                    return FALSE;
    254254            }
     255            /* Windows does this for overlapped windows
     256             * (I don't know about other styles.) */
     257            if (cs->hwndParent == GetDesktopWindow() && (!(cs->style & WS_CHILD) || (cs->style & WS_POPUP)))
     258            {
     259                    cs->hwndParent = 0;
     260            }
    255261    }
    256262    else
     
    927933    if(fClick)
    928934    {
    929      HWND hwndTop;
     935      HWND hwndTop;
    930936
    931937        /* Activate the window if needed */
     
    945951                   && (hwndTop != GetForegroundWindow()) )
    946952                {
     953                    Win32BaseWindow *win32top = Win32BaseWindow::GetWindowFromHandle(hwndTop);
     954
    947955                    //SvL: Calling OSLibSetActiveWindow(hwndTop); causes focus problems
    948                     OSLibWinSetFocus(getOS2FrameWindowHandle());
     956                    if (win32top) OSLibWinSetFocus(win32top->getOS2FrameWindowHandle());
    949957                }
    950958        }
     
    16591667        {
    16601668          LRESULT result = 0;
    1661           if (!windowClass) return result;
     1669
    16621670          /* Set the appropriate icon members in the window structure. */
    16631671          if (wParam == ICON_SMALL)
     
    16731681            {
    16741682              hIcon = (HICON)lParam;
    1675               OSLibWinSetIcon(OS2HwndFrame,hIcon);
     1683              if ((dwStyle & WS_CAPTION) == WS_CAPTION)
     1684                OSLibWinSetIcon(OS2HwndFrame,hIcon);
    16761685            }
    16771686          }
     1687          if ((Msg == WM_SETICON) && ((dwStyle & WS_CAPTION) == WS_CAPTION))
     1688            HandleNCPaint((HRGN)1);
     1689
    16781690          return result;
    16791691        }
     
    19501962        window = parentwindow;
    19511963   }
     1964}
     1965//******************************************************************************
     1966// Returns the big or small icon for the window, falling back to the
     1967// class as windows does.
     1968//******************************************************************************
     1969HICON Win32BaseWindow::IconForWindow(WPARAM fType)
     1970{
     1971  HICON hWndIcon;
     1972
     1973  if (fType == ICON_BIG)
     1974  {
     1975    if (hIcon) hWndIcon = hIcon;
     1976    else if (windowClass && windowClass->getIcon()) hWndIcon = windowClass->getIcon();
     1977    else if (!(dwStyle & DS_MODALFRAME))
     1978      hWndIcon = LoadImageA(0,MAKEINTRESOURCEA(OIC_ODINICON),IMAGE_ICON,0,0,LR_DEFAULTCOLOR);
     1979    else hWndIcon = 0;
     1980  } else
     1981  {
     1982    if (hIconSm) hWndIcon = hIconSm;
     1983    else if (hIcon) hWndIcon = hIcon;
     1984    else if (windowClass && windowClass->getIconSm()) hWndIcon = windowClass->getIconSm();
     1985    else if (windowClass && windowClass->getIcon()) hWndIcon = windowClass->getIcon();
     1986    else if (!(dwStyle & DS_MODALFRAME))
     1987      hWndIcon = LoadImageA(0,MAKEINTRESOURCEA(OIC_ODINICON),IMAGE_ICON,0,0,LR_DEFAULTCOLOR);
     1988    else hWndIcon = 0;
     1989  }
     1990
     1991  return hWndIcon;
    19521992}
    19531993//******************************************************************************
     
    27002740                    return value;
    27012741
    2702                 value &= ~(WS_VISIBLE | WS_CHILD);      /* Some bits can't be changed this way (WINE) */
     2742                value &= ~WS_CHILD;      /* Some bits can't be changed this way (WINE) */
    27032743                ss.styleOld = getStyle();
    2704                 ss.styleNew = value | (ss.styleOld & (WS_VISIBLE | WS_CHILD));
     2744                ss.styleNew = value | (ss.styleOld & WS_CHILD);
    27052745                dprintf(("SetWindowLong GWL_STYLE %x old %x new style %x", getWindowHandle(), ss.styleOld, ss.styleNew));
    27062746                SendInternalMessageA(WM_STYLECHANGING,GWL_STYLE,(LPARAM)&ss);
Note: See TracChangeset for help on using the changeset viewer.