Changeset 1248 for trunk/src/user32/win32wbase.cpp
- Timestamp:
- Oct 11, 1999, 6:04:52 PM (26 years ago)
- File:
-
- 1 edited
-
trunk/src/user32/win32wbase.cpp (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbase.cpp
r1245 r1248 1 /* $Id: win32wbase.cpp,v 1.3 4 1999-10-11 15:26:05 sandervlExp $ */1 /* $Id: win32wbase.cpp,v 1.35 1999-10-11 16:04:51 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 432 432 DWORD dwOSWinStyle, dwOSFrameStyle; 433 433 434 OSLibWinConvertStyle(cs->style, cs->dwExStyle, &dwOSWinStyle, &dwOSFrameStyle, &borderWidth, &borderHeight); 434 OSLibWinConvertStyle(cs->style, &cs->dwExStyle, &dwOSWinStyle, &dwOSFrameStyle, &borderWidth, &borderHeight); 435 dwExStyle = cs->dwExStyle; 435 436 436 437 //CB: dwOSFrameStyle handled by OSLibWinConvertStyle … … 532 533 rectClient.right-rectClient.left, 533 534 rectClient.bottom-rectClient.top, 534 SWP_NOACTIVATE | SWP_NOZORDER );535 SWP_NOACTIVATE | SWP_NOZORDER ); 535 536 } 536 537 else { … … 540 541 SWP_NOACTIVATE); 541 542 } 543 542 544 //Subclass frame 543 544 545 if (isFrameWindow()) 545 546 { 546 547 pOldFrameProc = FrameSubclassFrameWindow(this); 547 if ( dwStyle & WS_CHILD && HAS_3DFRAME(dwExStyle)) FrameSetBorderSize(this);548 if (isChild()) FrameSetBorderSize(this,TRUE); 548 549 } 549 550 … … 1456 1457 if( ctlType == CTLCOLOR_SCROLLBAR) 1457 1458 { 1458 HBRUSH hb = GetSysColorBrush(COLOR_SCROLLBAR);1459 HBRUSH hb = GetSysColorBrush(COLOR_SCROLLBAR); 1459 1460 COLORREF bk = GetSysColor(COLOR_3DHILIGHT); 1460 1461 SetTextColor( hdc, GetSysColor(COLOR_3DFACE)); … … 1471 1472 } 1472 1473 #endif 1473 UnrealizeObject( hb );1474 UnrealizeObject( hb ); 1474 1475 return (LRESULT)hb; 1475 1476 } … … 1477 1478 SetTextColor( hdc, GetSysColor(COLOR_WINDOWTEXT)); 1478 1479 1479 if ((ctlType == CTLCOLOR_EDIT) || (ctlType == CTLCOLOR_LISTBOX))1480 {1481 SetBkColor( hdc, GetSysColor(COLOR_WINDOW) );1482 }1483 else1484 {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 } 1488 1489 return (LRESULT)GetSysColorBrush(COLOR_WINDOW); 1489 1490 } … … 1531 1532 1532 1533 case WM_CTLCOLOR: 1533 return DefWndControlColor(HIWORD(lParam), (HDC)wParam);1534 return DefWndControlColor(HIWORD(lParam), (HDC)wParam); 1534 1535 1535 1536 case WM_VKEYTOITEM: 1536 1537 case WM_CHARTOITEM: 1537 return -1;1538 return -1; 1538 1539 1539 1540 case WM_PARENTNOTIFY: … … 1967 1968 dprintf(("ShowWindow %x", nCmdShow)); 1968 1969 if(fFirstShow) { 1969 if(isFrameWindow() && IS_OVERLAPPED(getStyle()) ) {1970 if(isFrameWindow() && IS_OVERLAPPED(getStyle()) && !isChild()) { 1970 1971 SendMessageA(WM_SIZE, SIZE_RESTORED, 1971 1972 MAKELONG(rectClient.right-rectClient.left, … … 2047 2048 { 2048 2049 hParent = getParent()->getOS2WindowHandle(); 2049 OSLibWinQueryWindowPos( OS2Hwnd, &swpOld);2050 OSLibWinQueryWindowPos(isFrameWindow() ? OS2HwndFrame:OS2Hwnd, &swpOld); 2050 2051 } 2051 2052 else … … 2064 2065 if (isFrameWindow()) 2065 2066 { 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 } 2074 2078 2075 2079 swp.hwnd = OS2HwndFrame; … … 2602 2606 Win32BaseWindow *Win32BaseWindow::GetWindowFromOS2FrameHandle(HWND hwnd) 2603 2607 { 2604 Win32BaseWindow *win32wnd;2605 DWORD magic;2606 2607 2608 return GetWindowFromOS2Handle(OSLibWinWindowFromID(hwnd,OSLIB_FID_CLIENT)); 2608 2609 //CB: doesn't work with frame window words2610 /*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 */2619 2609 } 2620 2610 //****************************************************************************** … … 2646 2636 //****************************************************************************** 2647 2637 //****************************************************************************** 2638 2648 2639 GenericObject *Win32BaseWindow::windows = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.
