- Timestamp:
- Oct 21, 1999, 12:35:54 AM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/combo.cpp
r1368 r1387 1 /* $Id: combo.cpp,v 1. 6 1999-10-20 06:38:08sandervl Exp $ */1 /* $Id: combo.cpp,v 1.7 1999-10-20 22:35:52 sandervl Exp $ */ 2 2 /* 3 3 * Combo controls … … 375 375 else 376 376 { 377 //SvL: Listbox size might have changed! 378 if(lphc->hWndLBox) 379 GetWindowRect(lphc->hWndLBox, lprLB); 380 377 381 /* 378 382 * Make sure the dropped width is as large as the combobox itself. … … 470 474 LPCREATESTRUCTA lpcs = (CREATESTRUCTA*)lParam; 471 475 476 //testestest 477 #if 1 478 lphc->dwStyle |= CBS_SIMPLE; 479 #else 472 480 if( !CB_GETTYPE(lphc) ) lphc->dwStyle |= CBS_SIMPLE; 473 481 else if( CB_GETTYPE(lphc) != CBS_DROPDOWNLIST ) lphc->wState |= CBF_EDIT; 482 #endif 474 483 475 484 lphc->hwndself = hwnd; … … 1546 1555 static void COMBO_Size( LPHEADCOMBO lphc ) 1547 1556 { 1557 dprintf(("COMBO_Size")); 1548 1558 CBCalcPlacement(lphc->hwndself, 1549 1559 lphc, -
trunk/src/user32/pmwindow.cpp
r1376 r1387 1 /* $Id: pmwindow.cpp,v 1.3 7 1999-10-20 13:46:26sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.38 1999-10-20 22:35:53 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 911 911 HWND hParent = NULLHANDLE, hFrame = NULLHANDLE; 912 912 913 dprintf(("OS2Subclass: WM_WINDOWPOSCHANGED %x %x (%d,%d) (%d,%d)", hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 913 914 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break; 914 915 915 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) 916 hFrame = WinQueryWindow(hwnd, QW_PARENT); 916 hParent = hFrame = WinQueryWindow(hwnd, QW_PARENT); 917 917 918 918 OSLibMapSWPtoWINDOWPOS(pswp,&wp, &swpOld,hParent,hFrame); 919 919 920 win32wnd->setWindowRect( wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy);920 win32wnd->setWindowRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy); 921 921 win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy); 922 wp.x = swpOld.x; 923 wp.y = swpOld.y; 924 wp.cx = swpOld.cx; 925 wp.cy = swpOld.cy; 926 927 wp.hwnd = win32wnd->getWindowHandle(); 922 928 923 929 win32wnd->MsgPosChanged((LPARAM)&wp); -
trunk/src/user32/user32.cpp
r1377 r1387 1 /* $Id: user32.cpp,v 1.4 5 1999-10-20 13:48:07 phallerExp $ */1 /* $Id: user32.cpp,v 1.46 1999-10-20 22:35:54 sandervl Exp $ */ 2 2 3 3 /* … … 2262 2262 } 2263 2263 2264 /* Coordinate Space and Transformation Functions */2265 2266 int WIN32API MapWindowPoints( HWND hWndFrom, HWND hWndTo, LPPOINT lpPoints, UINT cPoints)2267 {2268 #ifdef DEBUG2269 WriteLog("USER32: MapWindowPoints\n");2270 #endif2271 hWndFrom = Win32Window::Win32ToOS2Handle(hWndFrom);2272 hWndTo = Win32Window::Win32ToOS2Handle(hWndTo);2273 2274 return O32_MapWindowPoints(hWndFrom,hWndTo,lpPoints,cPoints);2275 }2276 //******************************************************************************2277 //******************************************************************************2278 BOOL WIN32API ScreenToClient (HWND hwnd, LPPOINT pt)2279 {2280 Win32BaseWindow *wnd;2281 PRECT rcl;2282 2283 dprintf(("ScreenToClient %x (%d,%d)\n", hwnd, pt->x, pt->y));2284 2285 if (!hwnd) return (TRUE);2286 wnd = Win32BaseWindow::GetWindowFromHandle (hwnd);2287 if (!wnd) return (TRUE);2288 2289 rcl = wnd->getClientRect();2290 pt->y = ScreenHeight - pt->y;2291 OSLibWinMapWindowPoints (OSLIB_HWND_DESKTOP, wnd->getOS2WindowHandle(), (OSLIBPOINT *)pt, 1);2292 pt->y = (rcl->bottom - rcl->top) - pt->y;2293 dprintf(("ScreenToClient %x returned (%d,%d)\n", hwnd, pt->x, pt->y));2294 return (TRUE);2295 }2296 2297 2264 /* Icon Functions */ 2298 2265 int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon) -
trunk/src/user32/window.cpp
r1351 r1387 1 /* $Id: window.cpp,v 1.2 1 1999-10-18 11:59:58sandervl Exp $ */1 /* $Id: window.cpp,v 1.22 1999-10-20 22:35:54 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 318 318 return 0; 319 319 } 320 dprintf(("GetParent %x", hwnd));320 // dprintf(("GetParent %x", hwnd)); 321 321 return window->GetParent(); 322 322 } … … 715 715 HWND hwndWin32 = hwnd; 716 716 717 #if 1718 717 Win32BaseWindow *window; 719 718 … … 728 727 dprintf(("GetClientRect of %X returned (%d,%d) (%d,%d)\n", hwndWin32, pRect->left, pRect->top, pRect->right, pRect->bottom)); 729 728 return TRUE; 730 #else731 hwnd = Win32BaseWindow::Win32ToOS2Handle(hwnd);732 rc = OSLibWinQueryWindowRect(hwnd, pRect);733 dprintf(("GetClientRect of %X returned (%d,%d) (%d,%d)\n", hwndWin32, pRect->left, pRect->top, pRect->right, pRect->bottom));734 return rc;735 #endif736 729 } 737 730 //****************************************************************************** … … 747 740 dprintf(("AdjustWindowRectEx %x %x %d (%d,%d)(%d,%d)\n", style, exStyle, menu, rect->right, rect->top, rect->left, rect->bottom)); 748 741 749 #if 0750 O32_AdjustWindowRectEx(rect, style, menu, exStyle);751 #else752 742 /* Correct the window style */ 753 743 if (!(style & (WS_POPUP | WS_CHILD))) /* Overlapped window */ … … 761 751 Win32BaseWindow::NC_AdjustRectOuter( rect, style, menu, exStyle ); 762 752 Win32BaseWindow::NC_AdjustRectInner( rect, style, exStyle ); 763 #endif764 753 765 754 dprintf(("AdjustWindowRectEx returned (%d,%d)(%d,%d)\n", rect->right, rect->top, rect->left, rect->bottom)); 766 755 return TRUE; 756 } 757 //****************************************************************************** 758 /* Coordinate Space and Transformation Functions */ 759 //****************************************************************************** 760 int WIN32API MapWindowPoints(HWND hwndFrom, HWND hwndTo, LPPOINT lpPoints, 761 UINT cPoints) 762 { 763 Win32BaseWindow *wndfrom, *wndto; 764 int retval = 0; 765 OSLIBPOINT point; 766 767 if(lpPoints == NULL || cPoints == 0) { 768 SetLastError(ERROR_INVALID_PARAMETER); 769 return 0; 770 } 771 if(hwndFrom) 772 { 773 wndfrom = Win32BaseWindow::GetWindowFromHandle(hwndFrom); 774 if(!wndfrom) { 775 dprintf(("MapWindowPoints, window %x not found", hwndFrom)); 776 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 777 return 0; 778 } 779 } 780 else wndfrom = windowDesktop; 781 782 if(hwndTo) 783 { 784 wndto = Win32BaseWindow::GetWindowFromHandle(hwndTo); 785 if(!wndto) { 786 dprintf(("MapWindowPoints, window %x not found", hwndTo)); 787 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 788 return 0; 789 } 790 } 791 else wndto = windowDesktop; 792 793 if(wndto == wndfrom) 794 return 0; //nothing to do 795 796 dprintf(("USER32: MapWindowPoints %x to %x (%d,%d) (%d)", hwndFrom, hwndTo, lpPoints->x, lpPoints->y, cPoints)); 797 point.x = lpPoints->x; 798 point.y = wndfrom->getWindowHeight() - lpPoints->y; 799 800 OSLibWinMapWindowPoints(wndfrom->getOS2WindowHandle(), wndto->getOS2WindowHandle(), &point, 1); 801 point.y = wndto->getWindowHeight() - point.y; 802 803 WORD xinc = point.x - lpPoints->x; 804 WORD yinc = point.y - lpPoints->y; 805 806 for(int i=1;i<cPoints;i++) 807 { 808 lpPoints[i].x += xinc; 809 lpPoints[i].y += yinc; 810 } 811 retval = ((DWORD)yinc << 16) | xinc; 812 return retval; 813 } 814 //****************************************************************************** 815 //****************************************************************************** 816 BOOL WIN32API ScreenToClient (HWND hwnd, LPPOINT pt) 817 { 818 Win32BaseWindow *wnd; 819 PRECT rcl; 820 821 dprintf(("ScreenToClient %x (%d,%d)\n", hwnd, pt->x, pt->y)); 822 823 if (!hwnd) return (TRUE); 824 wnd = Win32BaseWindow::GetWindowFromHandle (hwnd); 825 if (!wnd) return (TRUE); 826 827 rcl = wnd->getClientRect(); 828 pt->y = ScreenHeight - pt->y; 829 OSLibWinMapWindowPoints (OSLIB_HWND_DESKTOP, wnd->getOS2WindowHandle(), (OSLIBPOINT *)pt, 1); 830 pt->y = (rcl->bottom - rcl->top) - pt->y; 831 dprintf(("ScreenToClient %x returned (%d,%d)\n", hwnd, pt->x, pt->y)); 832 return (TRUE); 767 833 } 768 834 //****************************************************************************** … … 1280 1346 1281 1347 if(lpfn == NULL) { 1282 dprintf(("EnumChildWindows invalid parameter %x %x\n", hwnd, lParam)); 1348 dprintf(("EnumChildWindows invalid parameter %x %x\n", hwnd, lParam)); 1283 1349 SetLastError(ERROR_INVALID_PARAMETER); 1284 1350 return FALSE;
Note:
See TracChangeset
for help on using the changeset viewer.