Changeset 3153 for trunk/src/user32/win32wbase.cpp
- Timestamp:
- Mar 18, 2000, 5:13:41 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbase.cpp
r3144 r3153 1 /* $Id: win32wbase.cpp,v 1.17 3 2000-03-17 17:12:08 cbratschi Exp $ */1 /* $Id: win32wbase.cpp,v 1.174 2000-03-18 16:13:38 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 253 253 return FALSE; 254 254 } 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 } 255 261 } 256 262 else … … 927 933 if(fClick) 928 934 { 929 HWND hwndTop;935 HWND hwndTop; 930 936 931 937 /* Activate the window if needed */ … … 945 951 && (hwndTop != GetForegroundWindow()) ) 946 952 { 953 Win32BaseWindow *win32top = Win32BaseWindow::GetWindowFromHandle(hwndTop); 954 947 955 //SvL: Calling OSLibSetActiveWindow(hwndTop); causes focus problems 948 OSLibWinSetFocus(getOS2FrameWindowHandle());956 if (win32top) OSLibWinSetFocus(win32top->getOS2FrameWindowHandle()); 949 957 } 950 958 } … … 1659 1667 { 1660 1668 LRESULT result = 0; 1661 if (!windowClass) return result; 1669 1662 1670 /* Set the appropriate icon members in the window structure. */ 1663 1671 if (wParam == ICON_SMALL) … … 1673 1681 { 1674 1682 hIcon = (HICON)lParam; 1675 OSLibWinSetIcon(OS2HwndFrame,hIcon); 1683 if ((dwStyle & WS_CAPTION) == WS_CAPTION) 1684 OSLibWinSetIcon(OS2HwndFrame,hIcon); 1676 1685 } 1677 1686 } 1687 if ((Msg == WM_SETICON) && ((dwStyle & WS_CAPTION) == WS_CAPTION)) 1688 HandleNCPaint((HRGN)1); 1689 1678 1690 return result; 1679 1691 } … … 1950 1962 window = parentwindow; 1951 1963 } 1964 } 1965 //****************************************************************************** 1966 // Returns the big or small icon for the window, falling back to the 1967 // class as windows does. 1968 //****************************************************************************** 1969 HICON 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; 1952 1992 } 1953 1993 //****************************************************************************** … … 2700 2740 return value; 2701 2741 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) */ 2703 2743 ss.styleOld = getStyle(); 2704 ss.styleNew = value | (ss.styleOld & (WS_VISIBLE | WS_CHILD));2744 ss.styleNew = value | (ss.styleOld & WS_CHILD); 2705 2745 dprintf(("SetWindowLong GWL_STYLE %x old %x new style %x", getWindowHandle(), ss.styleOld, ss.styleNew)); 2706 2746 SendInternalMessageA(WM_STYLECHANGING,GWL_STYLE,(LPARAM)&ss);
Note:
See TracChangeset
for help on using the changeset viewer.