- Timestamp:
- Oct 8, 1999, 4:57:18 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibwin.cpp
r1184 r1186 1 /* $Id: oslibwin.cpp,v 1.1 5 1999-10-08 12:10:27 cbratschiExp $ */1 /* $Id: oslibwin.cpp,v 1.16 1999-10-08 14:57:17 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 643 643 { 644 644 return WinCalcFrameRect(hwndFrame, (PRECTL)pRect, fClient); 645 } 646 //****************************************************************************** 647 //****************************************************************************** 648 BOOL OSLibGetMinMaxInfo(HWND hwndFrame, MINMAXINFO *pMinMax) 649 { 650 TRACKINFO tinfo; 651 652 memset(&tinfo, 0, sizeof(TRACKINFO)); 653 WinSendMsg(hwndFrame, WM_QUERYTRACKINFO, (MPARAM)0,(MPARAM)&tinfo); 654 655 pMinMax->ptMinTrackSize.x = tinfo.ptlMinTrackSize.x; 656 pMinMax->ptMinTrackSize.y = tinfo.ptlMinTrackSize.y; 657 pMinMax->ptMaxTrackSize.x = tinfo.ptlMaxTrackSize.x; 658 pMinMax->ptMaxTrackSize.y = tinfo.ptlMaxTrackSize.y; 659 return TRUE; 645 660 } 646 661 //****************************************************************************** -
trunk/src/user32/oslibwin.h
r1176 r1186 1 /* $Id: oslibwin.h,v 1.1 0 1999-10-07 23:21:30sandervl Exp $ */1 /* $Id: oslibwin.h,v 1.11 1999-10-08 14:57:17 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 211 211 BOOL OSLibWinQueryWindowRect(HWND hwnd, PRECT pRect, int RelativeTo = RELATIVE_TO_WINDOW); 212 212 BOOL OSLibWinCalcFrameRect(HWND hwndFrame, RECTLOS2 *pRect, BOOL fClient); 213 BOOL OSLibGetMinMaxInfo(HWND hwndFrame, MINMAXINFO *pMinMax); 213 214 214 215 #define QWOS_NEXT 0 -
trunk/src/user32/pmwindow.cpp
r1176 r1186 1 /* $Id: pmwindow.cpp,v 1.2 1 1999-10-07 23:21:30sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.22 1999-10-08 14:57:17 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 298 298 classStyle = win32wnd->getClass()->getStyle(); 299 299 300 #if 0 301 if ((yDelta != 0) && ((classStyle & CS_VREDRAW_W) || 302 ((classStyle & CS_HREDRAW_W) && (pswp->cx != pswpo->cx)))) 303 #else 300 304 if (yDelta != 0 || xDelta != 0) 305 #endif 301 306 { 302 307 HENUM henum = WinBeginEnumWindows(pswp->hwnd); … … 321 326 #endif 322 327 323 swp[i].cy += yDelta; 324 swp[i].fl = SWP_SIZE; 328 swp[i].y += yDelta; 325 329 326 330 if (i == 9) -
trunk/src/user32/win32wbase.cpp
r1184 r1186 1 /* $Id: win32wbase.cpp,v 1.2 8 1999-10-08 12:10:27 cbratschiExp $ */1 /* $Id: win32wbase.cpp,v 1.29 1999-10-08 14:57:18 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 339 339 if (HOOK_IsHooked( WH_CBT )) 340 340 { 341 CBT_CREATEWNDA cbtc;341 CBT_CREATEWNDA cbtc; 342 342 LRESULT ret; 343 343 344 cbtc.lpcs = cs;345 cbtc.hwndInsertAfter = hwndLinkAfter;344 cbtc.lpcs = cs; 345 cbtc.hwndInsertAfter = hwndLinkAfter; 346 346 ret = unicode ? HOOK_CallHooksW(WH_CBT, HCBT_CREATEWND, Win32Hwnd, (LPARAM)&cbtc) 347 347 : HOOK_CallHooksA(WH_CBT, HCBT_CREATEWND, Win32Hwnd, (LPARAM)&cbtc); … … 543 543 544 544 fCreated = TRUE; //Allow WM_SIZE messages now 545 if(Send InternalMessage(WM_NCCREATE, 0, (LPARAM)cs) )545 if(SendMessageA(WM_NCCREATE, 0, (LPARAM)cs) ) 546 546 { 547 547 //doesn't work right, messes up client rectangle … … 551 551 OffsetRect(&rectWindow, maxPos.x - rectWindow.left, maxPos.y - rectWindow.top); 552 552 dprintf(("Sending WM_CREATE")); 553 if( (Send InternalMessage(WM_CREATE, 0, (LPARAM)cs )) != -1 )553 if( (SendMessageA(WM_CREATE, 0, (LPARAM)cs )) != -1 ) 554 554 { 555 555 if(!(flags & WIN_NEED_SIZE)) { … … 598 598 if( dwStyle & WS_MINIMIZE ) 599 599 { 600 if( !Send InternalMessageA(WM_QUERYOPEN, 0, 0L ) )600 if( !SendMessageA(WM_QUERYOPEN, 0, 0L ) ) 601 601 return (SWP_NOSIZE | SWP_NOMOVE); 602 602 swpFlags |= SWP_NOCOPYBITS; … … 736 736 // } 737 737 738 Send InternalMessageA(WM_GETMINMAXINFO, 0, (LPARAM)&MinMax );738 SendMessageA(WM_GETMINMAXINFO, 0, (LPARAM)&MinMax ); 739 739 740 740 /* Some sanity checks */ … … 779 779 params.lppos = &winposCopy; 780 780 } 781 result = Send InternalMessageA(WM_NCCALCSIZE, calcValidRect,782 781 result = SendMessageA(WM_NCCALCSIZE, calcValidRect, 782 (LPARAM)¶ms ); 783 783 *newClientRect = params.rgrc[0]; 784 784 return result; … … 821 821 ULONG Win32BaseWindow::MsgEnable(BOOL fEnable) 822 822 { 823 if(fEnable) { 824 dwStyle &= ~WS_DISABLED; 825 } 826 else dwStyle |= WS_DISABLED; 827 823 828 return SendInternalMessageA(WM_ENABLE, fEnable, 0); 824 829 } … … 1447 1452 //SvL: Set background color to default button color (not window (white)) 1448 1453 case WM_CTLCOLORBTN: 1449 1450 1451 1454 SetBkColor((HDC)wParam, GetSysColor(COLOR_BTNFACE)); 1455 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 1456 return GetSysColorBrush(COLOR_BTNFACE); 1452 1457 1453 1458 //SvL: Set background color to default dialog color if window is dialog 1454 1459 case WM_CTLCOLORDLG: 1455 1460 case WM_CTLCOLORSTATIC: 1456 if(IsDialog()) {1461 if(IsDialog()) { 1457 1462 SetBkColor((HDC)wParam, GetSysColor(COLOR_BTNFACE)); 1458 1463 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 1459 1464 return GetSysColorBrush(COLOR_BTNFACE); 1460 }1461 //no break1465 } 1466 //no break 1462 1467 1463 1468 case WM_CTLCOLORMSGBOX: … … 1521 1526 else if (dwStyle & WS_MINIMIZE) wp = SIZE_MINIMIZED; 1522 1527 1523 SendMessageA(WM_SIZE, wp, MAKELONG(rectClient.right - rectClient.left,1524 rectClient.bottom - rectClient.top));1528 SendMessageA(WM_SIZE, wp, MAKELONG(rectClient.right - rectClient.left, 1529 rectClient.bottom - rectClient.top)); 1525 1530 } 1526 1531 return 0; … … 1828 1833 if(parentwindow) { 1829 1834 if(Msg == WM_CREATE || Msg == WM_DESTROY) { 1830 parentwindow->Send InternalMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), (LPARAM)window->getWindowHandle());1835 parentwindow->SendMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), (LPARAM)window->getWindowHandle()); 1831 1836 } 1832 else parentwindow->Send InternalMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), lParam );1837 else parentwindow->SendMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), lParam ); 1833 1838 } 1834 1839 } … … 1886 1891 dprintf(("Win32BaseWindow::SetIcon %x", hIcon)); 1887 1892 if(OSLibWinSetIcon(OS2HwndFrame, hIcon) == TRUE) { 1888 SendInternalMessageA(WM_SETICON, hIcon, 0);1889 return TRUE;1893 SendMessageA(WM_SETICON, hIcon, 0); 1894 return TRUE; 1890 1895 } 1891 1896 return FALSE; … … 1980 1985 hParent = getParent()->getOS2WindowHandle(); 1981 1986 OSLibWinQueryWindowPos(OS2Hwnd, &swpOld); 1982 } else 1987 } 1988 else 1983 1989 OSLibWinQueryWindowPos(OS2HwndFrame, &swpOld); 1984 1990 } … … 2004 2010 if (swp.cy < minTrack.y) swp.cy = minTrack.y; 2005 2011 2006 RECTLOS2 rectFrame;2007 2008 //Calculate correct frame rectangle from client rectangle2009 //NOTE: xLeft & yBottom can become too big2010 //Some programs use GetSystemMetrics 32/33 to determine offsets2011 rectFrame.xLeft = swp.x;2012 rectFrame.yBottom = swp.y;2013 rectFrame.xRight = swp.x + swp.cx;2014 rectFrame.yTop = swp.y + swp.cy;2015 2016 OSLibWinCalcFrameRect(OS2HwndFrame, &rectFrame, FALSE);2017 swp.x = rectFrame.xLeft;2018 swp.y = rectFrame.yBottom;2019 swp.cx = rectFrame.xRight - rectFrame.xLeft;2020 swp.cy = rectFrame.yTop - rectFrame.yBottom;2021 if(swp.x < 0) {2022 swp.cx += -swp.x;2023 swp.x = 0;2024 }2025 if(swp.y + swp.cy > ScreenHeight) {2026 swp.y = ScreenHeight - swp.cy;2027 }2028 2012 swp.hwnd = OS2HwndFrame; 2029 } else 2013 } 2014 else 2030 2015 swp.hwnd = OS2Hwnd; 2016 2031 2017 dprintf (("WinSetWindowPos %x %x (%d,%d)(%d,%d) %x", swp.hwnd, swp.hwndInsertBehind, swp.x, swp.y, swp.cx, swp.cy, swp.fl)); 2032 2018 … … 2035 2021 if (rc == FALSE) 2036 2022 { 2037 // SET_ERROR_LAST();2038 2023 } 2039 2024 else … … 2121 2106 if (isIcon) 2122 2107 { 2123 Send InternalMessageA(WM_ICONERASEBKGND, (WPARAM)hdc, 0);2124 Send InternalMessageA(WM_PAINTICON, 0, 0);2108 SendMessageA(WM_ICONERASEBKGND, (WPARAM)hdc, 0); 2109 SendMessageA(WM_PAINTICON, 0, 0); 2125 2110 } else 2126 2111 { 2127 Send InternalMessageA(WM_ERASEBKGND, (WPARAM)hdc, 0);2128 Send InternalMessageA(WM_PAINT, 0, 0);2112 SendMessageA(WM_ERASEBKGND, (WPARAM)hdc, 0); 2113 SendMessageA(WM_PAINT, 0, 0); 2129 2114 } 2130 2115 O32_ReleaseDC(OS2Hwnd, hdc); … … 2363 2348 return FALSE; 2364 2349 2365 if(windowNameA) 2366 if(windowNameW) 2350 if(windowNameA) free(windowNameA); 2351 if(windowNameW) free(windowNameW); 2367 2352 2368 2353 windowNameA = (LPSTR)_smalloc(strlen(lpsz)+1); … … 2384 2369 return FALSE; 2385 2370 2386 if(windowNameA) 2387 if(windowNameW) 2371 if(windowNameA) free(windowNameA); 2372 if(windowNameW) free(windowNameW); 2388 2373 2389 2374 windowNameW = (LPWSTR)_smalloc((lstrlenW((LPWSTR)lpsz)+1)*sizeof(WCHAR)); … … 2406 2391 switch(index) { 2407 2392 case GWL_EXSTYLE: 2408 2409 2410 2411 2412 2413 SendInternalMessageA(WM_STYLECHANGING,GWL_EXSTYLE,(LPARAM)&ss);2414 2415 2416 SendInternalMessageA(WM_STYLECHANGED,GWL_EXSTYLE,(LPARAM)&ss);2417 2418 2393 { 2394 STYLESTRUCT ss; 2395 2396 ss.styleOld = dwExStyle; 2397 ss.styleNew = value; 2398 SendMessageA(WM_STYLECHANGING,GWL_EXSTYLE,(LPARAM)&ss); 2399 oldval = dwExStyle; 2400 setExStyle(value); 2401 SendMessageA(WM_STYLECHANGED,GWL_EXSTYLE,(LPARAM)&ss); 2402 return oldval; 2403 } 2419 2404 case GWL_STYLE: 2420 2421 2422 2423 2424 2425 SendInternalMessageA(WM_STYLECHANGING,GWL_STYLE,(LPARAM)&ss);2426 2427 2428 2429 SendInternalMessageA(WM_STYLECHANGED,GWL_STYLE,(LPARAM)&ss);2430 2431 2405 { 2406 STYLESTRUCT ss; 2407 2408 ss.styleOld = dwStyle; 2409 ss.styleNew = value; 2410 SendMessageA(WM_STYLECHANGING,GWL_STYLE,(LPARAM)&ss); 2411 oldval = dwStyle; 2412 setStyle(value); 2413 OSLibSetWindowStyle(OS2HwndFrame, dwStyle); 2414 SendMessageA(WM_STYLECHANGED,GWL_STYLE,(LPARAM)&ss); 2415 return oldval; 2416 } 2432 2417 case GWL_WNDPROC: 2433 2418 oldval = (LONG)getWindowProc();
Note:
See TracChangeset
for help on using the changeset viewer.