- Timestamp:
- Oct 9, 2000, 7:26:55 PM (25 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/dc.cpp
r4455 r4463 1 /* $Id: dc.cpp,v 1.7 3 2000-10-08 14:09:40sandervl Exp $ */1 /* $Id: dc.cpp,v 1.74 2000-10-09 17:26:47 sandervl Exp $ */ 2 2 3 3 /* … … 330 330 pHps->isClient = FALSE; 331 331 332 #ifdef DEBUG 332 333 GreGetDCOrigin(pHps->hps, &point); 334 #endif 333 335 334 336 if(pHps->isClientArea) … … 399 401 rcl.yTop += rcltemp.yBottom; 400 402 rcl.yBottom += rcltemp.yBottom; 401 } 402 pHps->ptlOrigin.x = rcltemp.xLeft; 403 pHps->ptlOrigin.y = rcltemp.yBottom; 403 404 pHps->ptlOrigin.x = rcltemp.xLeft; 405 pHps->ptlOrigin.y = rcltemp.yBottom; 406 } 404 407 405 408 dprintf2(("selectClientArea %x: (%d,%d) -> (%d,%d)", window->getWindowHandle(), rcltemp.xLeft, rcltemp.yBottom, rcl.xLeft, rcl.yBottom)); … … 616 619 dprintf (("USER32: WARNING: WinQueryUpdateRect failed (error or no update rectangle)!!")); 617 620 618 selectClientArea(wnd, pHps);619 620 621 HRGN hrgnClip = GpiCreateRegion(pHps->hps, 1, &rectl); 621 622 GpiSetClipRegion(pHps->hps, hrgnClip, &hrgnOldClip); 623 624 selectClientArea(wnd, pHps); 622 625 623 626 //save old clip region (restored for CS_OWNDC windows in EndPaint) … … 669 672 WinShowTrackRect(wnd->getOS2WindowHandle(), FALSE); 670 673 674 #ifdef DEBUG 675 POINTL point; 676 GreGetDCOrigin(pHps->hps, &point); 677 dprintf(("dc origin (%d,%d)", point.x, point.y)); 678 #endif 679 671 680 if(wnd->needsEraseBkgnd() && lComplexity != RGN_NULL) { 672 681 wnd->setEraseBkgnd(FALSE); … … 674 683 } 675 684 else lpps->fErase = TRUE; 685 686 #ifdef DEBUG 687 GreGetDCOrigin(pHps->hps, &point); 688 dprintf(("dc origin (%d,%d)", point.x, point.y)); 689 #endif 676 690 677 691 lpps->hdc = (HDC)pHps->hps; -
trunk/src/user32/pmwindow.cpp
r4421 r4463 1 /* $Id: pmwindow.cpp,v 1.10 4 2000-10-04 19:35:31sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.105 2000-10-09 17:26:50 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 839 839 rc = WinQueryUpdateRect(hwnd, &rectl); 840 840 dprintf(("OS2: WM_PAINT %x (%d,%d) (%d,%d) rc=%d", win32wnd->getWindowHandle(), rectl.xLeft, rectl.yBottom, rectl.xRight, rectl.yTop, rc)); 841 841 842 if(rc && win32wnd->IsWindowCreated() && (rectl.xLeft != rectl.xRight && 842 843 rectl.yBottom != rectl.yTop)) … … 1009 1010 TRACKINFO track; 1010 1011 RECTL rcl; 1011 PRECT pWindowRect ;1012 PRECT pWindowRect, pClientRect; 1012 1013 HWND hwndTracking; 1013 1014 HPS hpsTrack; … … 1036 1037 } 1037 1038 1038 rcl.xLeft = pWindowRect->left; 1039 rcl.yTop = OSLibQueryScreenHeight() - pWindowRect->top; 1040 rcl.xRight = pWindowRect->right; 1041 rcl.yBottom = OSLibQueryScreenHeight() - pWindowRect->bottom; 1042 if(hwndTracking != HWND_DESKTOP) { 1043 WinMapWindowPoints(win32wnd->getOS2WindowHandle(), HWND_DESKTOP, (PPOINTL)&rcl, 2); 1044 } 1045 WinCopyRect(hab, &track.rclTrack, &rcl); /* starting point */ 1046 1047 WinSetRect(hab, &track.rclBoundary, 0, 0, parentWidth, parentHeight); /* bounding rectangle */ 1048 1039 mapWin32ToOS2Rect(parentHeight, pWindowRect, (PRECTLOS2)&track.rclTrack); 1040 WinQueryWindowRect(hwndTracking, &track.rclBoundary); 1041 1049 1042 track.ptlMinTrackSize.x = 10; 1050 1043 track.ptlMinTrackSize.y = 10; /* set smallest allowed size of rectangle */ … … 1056 1049 track.fs = flags; 1057 1050 1058 if(WinTrackRect( HWND_DESKTOP, NULL, &track) )1051 if(WinTrackRect(hwndTracking, NULL, &track) ) 1059 1052 { 1060 1053 if(hpsTrack) WinReleasePS(hpsTrack); -
trunk/src/user32/win32wbase.cpp
r4434 r4463 1 /* $Id: win32wbase.cpp,v 1.21 4 2000-10-05 18:37:26sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.215 2000-10-09 17:26:52 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 2178 2178 RECT oldClientRect = rectClient; 2179 2179 2180 if(getWindowHandle() == 0x68000004) {2181 rc = FALSE;2182 }2183 2180 if (fuFlags & 2184 2181 ~(SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | -
trunk/src/user32/win32wmdiclient.cpp
r3662 r4463 1 /* $Id: win32wmdiclient.cpp,v 1. 29 2000-06-07 14:51:33sandervl Exp $ */1 /* $Id: win32wmdiclient.cpp,v 1.30 2000-10-09 17:26:54 sandervl Exp $ */ 2 2 /* 3 3 * Win32 MDI Client Window Class for OS/2 … … 1257 1257 wndClass.cbWndExtra = 0; 1258 1258 wndClass.hCursor = 0; 1259 wndClass.hbrBackground = (HBRUSH) LTGRAY_BRUSH;1259 wndClass.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); 1260 1260 wndClass.lpszClassName = MDICLIENTCLASSNAMEA; 1261 1261 -
trunk/src/user32/window.cpp
r4460 r4463 1 /* $Id: window.cpp,v 1. 79 2000-10-08 20:05:29sandervl Exp $ */1 /* $Id: window.cpp,v 1.80 2000-10-09 17:26:55 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 16 16 * 17 17 * TODO: Decide what to do about commands for OS/2 windows (non-Win32 apps) 18 * TODO: ShowOwnedPopups needs to be tested 19 * GetLastActivePopup needs to be rewritten 20 * ArrangeIconicWindows probably also 18 21 * 19 22 */ … … 32 35 #include "winicon.h" 33 36 #include <win\winpos.h> 37 #include <win\win.h> 34 38 #include <heapstring.h> 35 39 … … 289 293 if(!window) { 290 294 dprintf(("CreateMDIWindowW, window %x not found", hwndParent)); 291 295 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 292 296 return 0; 293 297 } … … 319 323 } 320 324 if(window->isDesktopWindow()) { 321 322 325 dprintf(("WARNING: Trying to destroy desktop window!")); 326 return FALSE; 323 327 } 324 328 return window->DestroyWindow(); … … 366 370 } 367 371 if(hwndNewParent == HWND_DESKTOP) { 368 372 hwndNewParent = GetDesktopWindow(); 369 373 } 370 374 else { 371 372 373 374 375 376 375 parent = Win32BaseWindow::GetWindowFromHandle(hwndNewParent); 376 if(!window) { 377 dprintf(("SetParent, parent %x not found", hwndNewParent)); 378 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 379 return 0; 380 } 377 381 } 378 382 dprintf(("SetParent %x %x", hwndChild, hwndNewParent)); … … 402 406 403 407 if(hwnd == HWND_DESKTOP) { 404 408 window = windowDesktop; 405 409 } 406 410 else { 407 408 409 410 411 412 411 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 412 if(!window) { 413 dprintf(("GetTopWindow, window %x not found", hwnd)); 414 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 415 return 0; 416 } 413 417 } 414 418 hwndTop = window->GetTopWindow(); … … 482 486 if( IsWindow(hwnd) ) 483 487 { 484 485 488 WINDOWPLACEMENT wndpl; 489 UINT flags; 486 490 487 491 GetWindowPlacement(hwnd, &wndpl); 488 489 490 491 492 493 492 wndpl.length = sizeof(wndpl); 493 wndpl.showCmd = showCmd; 494 wndpl.flags = 0; 495 496 if(lpPoint) 497 { 494 498 wndpl.flags |= WPF_SETMINPOSITION; 495 496 497 498 499 wndpl.ptMinPosition = *lpPoint; 500 } 501 if(lpRect) 502 { 499 503 wndpl.rcNormalPosition = *lpRect; 500 504 } 501 505 SetWindowPlacement( hwnd, &wndpl); 502 506 } … … 747 751 //convert from parent coordinates to screen (if necessary) 748 752 if(window->getParent()) { 749 753 MapWindowPoints(window->getParent()->getWindowHandle(), 0, (PPOINT)pRect, 2); 750 754 } 751 755 … … 807 811 int rc = window->GetWindowTextW(lpsz, cch); 808 812 if(rc) { 809 810 811 813 LPSTR astring = UnicodeToAsciiString(lpsz); 814 dprintf(("GetWindowTextW %x %s", hwnd, lpsz)); 815 free(astring); 812 816 } 813 817 else dprintf(("GetWindowTextW %x returned %d", hwnd, rc)); … … 848 852 dprintf(("SetWindowTextW %x %s", hwnd, astring)); 849 853 free(astring); 850 if(hwnd == 0x68000008) {851 int i;852 i = 5;853 }854 854 #endif 855 855 return window->SetWindowTextW((LPWSTR)lpsz); … … 913 913 if(style == 0 && menu == FALSE && exStyle == 0) { 914 914 dprintf(("AdjustWindowRectEx %x %x %d (%d,%d)(%d,%d) -> no change required", style, exStyle, menu, rect->left, rect->top, rect->right, rect->bottom)); 915 return TRUE;//nothing needs to be changed (VERIFIED in NT 4)915 return TRUE; //nothing needs to be changed (VERIFIED in NT 4) 916 916 } 917 917 dprintf(("AdjustWindowRectEx %x %x %d (%d,%d)(%d,%d)\n", style, exStyle, menu, rect->left, rect->top, rect->right, rect->bottom)); 918 918 /* Correct the window style */ 919 919 if (!(style & (WS_POPUP | WS_CHILD))) /* Overlapped window */ 920 920 style |= WS_CAPTION; 921 921 922 922 //SvL: Include WS_POPUP -> otherwise HAS_THINFRAME is true for popup windows … … 949 949 //Adjust rect inner (Win32BaseWindow::AdjustRectInner) 950 950 if(!(style & WS_ICONIC)) { 951 952 953 954 955 956 957 951 if (exStyle & WS_EX_CLIENTEDGE) 952 InflateRect (rect, GetSystemMetrics(SM_CXEDGE), GetSystemMetrics(SM_CYEDGE)); 953 954 if (exStyle & WS_EX_STATICEDGE) 955 InflateRect (rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER)); 956 957 //SvL: scrollbars aren't checked *UNLESS* the style includes a border (any border) 958 958 // --> VERIFIED IN NT4, SP6 (fixes MFC apps with scrollbars + bar controls) 959 960 961 962 959 if(style & (WS_THICKFRAME|WS_BORDER|WS_DLGFRAME)) { 960 if (style & WS_VSCROLL) rect->right += GetSystemMetrics(SM_CXVSCROLL); 961 if (style & WS_HSCROLL) rect->bottom += GetSystemMetrics(SM_CYHSCROLL); 962 } 963 963 } 964 964 … … 986 986 if(wndFrom != windowDesktop) 987 987 { 988 988 window = wndFrom; 989 989 while(window) 990 990 { … … 998 998 if(wndTo != windowDesktop) 999 999 { 1000 1000 window = wndTo; 1001 1001 while(window) 1002 1002 { … … 1066 1066 1067 1067 if(!hwnd) { 1068 1068 return (TRUE); 1069 1069 } 1070 1070 wnd = Win32BaseWindow::GetWindowFromHandle (hwnd); … … 1552 1552 BOOL WIN32API OpenIcon(HWND hwnd) 1553 1553 { 1554 dprintf(("USER32: OpenIcon"));1554 dprintf(("USER32: OpenIcon %x", hwnd)); 1555 1555 1556 1556 if(!IsIconic(hwnd)) … … 1560 1560 } 1561 1561 //****************************************************************************** 1562 //****************************************************************************** 1563 BOOL WIN32API ShowOwnedPopups( HWND hwnd, BOOL arg2) 1564 { 1565 dprintf(("USER32: ShowOwnedPopups (OPEN32: todo) %x", hwnd)); 1566 return O32_ShowOwnedPopups(Win32BaseWindow::Win32ToOS2Handle(hwnd), arg2); 1562 //SDK: Windows can only be shown with ShowOwnedPopups if they were previously 1563 // hidden with the same api 1564 //TODO: -> needs testing 1565 //****************************************************************************** 1566 BOOL WIN32API ShowOwnedPopups(HWND hwndOwner, BOOL fShow) 1567 { 1568 Win32BaseWindow *window, *owner; 1569 HWND hwnd; 1570 1571 owner = Win32BaseWindow::GetWindowFromHandle(hwndOwner); 1572 if(!owner) { 1573 dprintf(("ShowOwnedPopups, window %x not found", hwndOwner)); 1574 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 1575 return FALSE; 1576 } 1577 dprintf(("USER32: ShowOwnedPopups %x %d", hwnd, fShow)); 1578 1579 hwnd = GetWindow(GetDesktopWindow(), GW_CHILD); 1580 while(hwnd) { 1581 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 1582 if(window) { 1583 if(window == owner && (window->getStyle() & WS_POPUP)) 1584 { 1585 if(fShow) { 1586 if(window->getFlags() & WIN_NEEDS_SHOW_OWNEDPOPUP) 1587 { 1588 /* 1589 * In Windows, ShowOwnedPopups(TRUE) generates WM_SHOWWINDOW messages with SW_PARENTOPENING, 1590 * regardless of the state of the owner 1591 */ 1592 SendMessageA(hwnd, WM_SHOWWINDOW, SW_SHOW, SW_PARENTOPENING); 1593 window->setFlags(window->getFlags() & ~WIN_NEEDS_SHOW_OWNEDPOPUP); 1594 } 1595 } 1596 else 1597 { 1598 if(IsWindowVisible(hwnd)) 1599 { 1600 /* 1601 * In Windows, ShowOwnedPopups(FALSE) generates WM_SHOWWINDOW messages with SW_PARENTCLOSING, 1602 * regardless of the state of the owner 1603 */ 1604 SendMessageA(hwnd, WM_SHOWWINDOW, SW_HIDE, SW_PARENTCLOSING); 1605 window->setFlags(window->getFlags() | WIN_NEEDS_SHOW_OWNEDPOPUP); 1606 } 1607 } 1608 } 1609 } 1610 else dprintf(("WARNING: window %x is not valid", hwnd)); 1611 1612 hwnd = GetWindow(hwnd, GW_HWNDNEXT); 1613 } 1614 return TRUE; 1567 1615 } 1568 1616 //****************************************************************************** … … 1586 1634 hwnd = Win32BaseWindow::OS2ToWin32Handle(O32_GetLastActivePopup(hWnd)); 1587 1635 1588 dprintf(("GetLastActivePopup %x returned %x ", hWnd, hwnd));1636 dprintf(("GetLastActivePopup %x returned %x NOT CORRECTLY IMPLEMENTED", hWnd, hwnd)); 1589 1637 return hwnd; 1590 1638 }
Note:
See TracChangeset
for help on using the changeset viewer.