- Timestamp:
- Oct 17, 1999, 6:59:58 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbase.cpp
r1337 r1340 1 /* $Id: win32wbase.cpp,v 1.5 0 1999-10-17 16:42:39sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.51 1999-10-17 16:59:58 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 2232 2232 hwnd = OSLibWinQueryClientWindow(hwnd); 2233 2233 if(hwnd) wnd = GetWindowFromOS2Handle(hwnd); 2234 if(!hwnd) wnd = GetWindowFromOS2FrameHandle(hwnd); 2234 2235 } 2235 2236 -
trunk/src/user32/window.cpp
r1337 r1340 1 /* $Id: window.cpp,v 1.1 8 1999-10-17 16:42:40sandervl Exp $ */1 /* $Id: window.cpp,v 1.19 1999-10-17 16:59:58 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 367 367 //****************************************************************************** 368 368 //****************************************************************************** 369 #if 0370 BOOL WIN32API UpdateWindow(HWND hwnd)371 {372 Win32BaseWindow *window;373 374 window = Win32BaseWindow::GetWindowFromHandle(hwnd);375 if(!window) {376 dprintf(("UpdateWindow, window %x not found", hwnd));377 return 0;378 }379 dprintf(("UpdateWindow %x", hwnd));380 return window->UpdateWindow();381 }382 #endif383 //******************************************************************************384 //******************************************************************************385 369 BOOL WIN32API IsIconic( HWND hwnd) 386 370 { … … 586 570 //****************************************************************************** 587 571 //****************************************************************************** 588 BOOL WIN32API IsZoomed( HWND arg1) 589 { 590 #ifdef DEBUG 591 WriteLog("USER32: IsZoomed\n"); 592 #endif 593 return O32_IsZoomed(arg1); 594 } 595 //****************************************************************************** 596 //****************************************************************************** 597 BOOL WIN32API LockWindowUpdate( HWND arg1) 598 { 599 #ifdef DEBUG 600 WriteLog("USER32: LockWindowUpdate\n"); 601 #endif 602 return O32_LockWindowUpdate(arg1); 603 } 604 //****************************************************************************** 605 //****************************************************************************** 606 607 #if 0 608 BOOL WIN32API RedrawWindow( HWND arg1, const RECT * arg2, HRGN arg3, UINT arg4) 609 { 610 BOOL rc; 611 612 rc = O32_RedrawWindow(arg1, arg2, arg3, arg4); 613 #ifdef DEBUG 614 WriteLog("USER32: RedrawWindow %X , %X, %X, %X returned %d\n", arg1, arg2, arg3, arg4, rc); 615 #endif 616 InvalidateRect(arg1, arg2, TRUE); 617 UpdateWindow(arg1); 618 SendMessageA(arg1, WM_PAINT, 0, 0); 619 return(rc); 620 } 621 #endif 572 BOOL WIN32API IsZoomed(HWND hwnd) 573 { 574 dprintf(("USER32: IsZoomed\n")); 575 return O32_IsZoomed(Win32BaseWindow::Win32ToOS2FrameHandle(hwnd)); 576 } 577 //****************************************************************************** 578 //****************************************************************************** 579 BOOL WIN32API LockWindowUpdate(HWND hwnd) 580 { 581 dprintf(("USER32: LockWindowUpdate\n")); 582 return O32_LockWindowUpdate(Win32BaseWindow::Win32ToOS2FrameHandle(hwnd)); 583 } 622 584 //****************************************************************************** 623 585 //****************************************************************************** … … 630 592 if(!window) { 631 593 dprintf(("GetWindowRect, window %x not found", hwnd)); 632 SetLastError(ERROR_INVALID_WINDOW_HANDLE);594 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 633 595 return 0; 634 596 } … … 646 608 if(!window) { 647 609 dprintf(("GetWindowTextLength, window %x not found", hwnd)); 648 SetLastError(ERROR_INVALID_WINDOW_HANDLE);610 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 649 611 return 0; 650 612 } … … 662 624 if(!window) { 663 625 dprintf(("GetWindowTextA, window %x not found", hwnd)); 664 SetLastError(ERROR_INVALID_WINDOW_HANDLE);626 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 665 627 return 0; 666 628 } … … 685 647 if(!window) { 686 648 dprintf(("GetWindowTextW, window %x not found", hwnd)); 687 SetLastError(ERROR_INVALID_WINDOW_HANDLE);649 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 688 650 return 0; 689 651 } … … 700 662 if(!window) { 701 663 dprintf(("SetWindowTextA, window %x not found", hwnd)); 702 SetLastError(ERROR_INVALID_WINDOW_HANDLE);664 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 703 665 return 0; 704 666 } … … 715 677 if(!window) { 716 678 dprintf(("SetWindowTextA, window %x not found", hwnd)); 717 SetLastError(ERROR_INVALID_WINDOW_HANDLE);679 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 718 680 return 0; 719 681 } … … 757 719 if(!window) { 758 720 dprintf(("GetClientRect, window %x not found", hwnd)); 759 SetLastError(ERROR_INVALID_WINDOW_HANDLE);721 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 760 722 return 0; 761 723 } … … 909 871 BOOL WIN32API ClientToScreen (HWND hwnd, PPOINT pt) 910 872 { 911 #ifdef DEBUG912 WriteLog("USER32: ClientToScreen\n");913 #endif914 873 Win32BaseWindow *wnd; 915 874 PRECT rcl; 916 875 876 dprintf(("USER32: ClientToScreen\n")); 917 877 if (!hwnd) { 918 SetLastError(ERROR_INVALID_PARAMETER);919 return (FALSE);878 SetLastError(ERROR_INVALID_PARAMETER); 879 return (FALSE); 920 880 } 921 881 wnd = Win32BaseWindow::GetWindowFromHandle (hwnd); 922 882 if (!wnd) { 923 SetLastError(ERROR_INVALID_WINDOW_HANDLE);924 return (FALSE);883 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 884 return (FALSE); 925 885 } 926 886 … … 1117 1077 if (GetWindowRect (hwndParent, &rect) == 0) { 1118 1078 // oops, invalid handle 1119 SetLastError(ERROR_INVALID_WINDOW_HANDLE);1079 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 1120 1080 return NULL; 1121 1081 } … … 1162 1122 } 1163 1123 1164 dprintf(("ChildWindowFromPointEx returned %x", hWnd));1124 dprintf(("ChildWindowFromPointEx returned %x", hWnd)); 1165 1125 // found it! 1166 1126 return hWnd; … … 1169 1129 // the point is in the parentwindow but the parentwindow has no child 1170 1130 // at this coordinate 1171 dprintf(("ChildWindowFromPointEx returned parent %x", hwndParent));1131 dprintf(("ChildWindowFromPointEx returned parent %x", hwndParent)); 1172 1132 return hwndParent; 1173 1133 } … … 1181 1141 if(!window) { 1182 1142 dprintf(("CloseWindow, window %x not found", hwnd)); 1183 SetLastError(ERROR_INVALID_WINDOW_HANDLE);1143 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 1184 1144 return 0; 1185 1145 } … … 1210 1170 if(!window) { 1211 1171 dprintf(("IsWindowUnicode, window %x not found", hwnd)); 1212 SetLastError(ERROR_INVALID_WINDOW_HANDLE);1172 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 1213 1173 return 0; 1214 1174 } … … 1291 1251 continue; 1292 1252 1293 window = Win32BaseWindow::GetWindowFrom Handle(hwndNext);1253 window = Win32BaseWindow::GetWindowFromOS2Handle(hwndNext); 1294 1254 if(window == NULL) { 1295 //OS/2 window or non-frame window, so skip it 1296 continue; 1255 window = Win32BaseWindow::GetWindowFromOS2FrameHandle(hwndNext); 1256 if(!window) { 1257 //OS/2 window or non-frame window, so skip it 1258 continue; 1259 } 1297 1260 } 1298 1261 if((rc = lpfn(window->getWindowHandle(), lParam)) == FALSE) … … 1316 1279 if(!parentwindow) { 1317 1280 dprintf(("EnumChildWindows, window %x not found", hwnd)); 1318 SetLastError(ERROR_INVALID_WINDOW_HANDLE);1281 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 1319 1282 return FALSE; 1320 1283 } … … 1323 1286 while ((hwndNext = OSLibWinGetNextWindow(henum)) != 0) 1324 1287 { 1325 window = Win32BaseWindow::GetWindowFrom Handle(hwndNext);1288 window = Win32BaseWindow::GetWindowFromOS2Handle(hwndNext); 1326 1289 if(window == NULL) { 1327 //OS/2 window or non-frame window, so skip it 1328 continue; 1290 window = Win32BaseWindow::GetWindowFromOS2FrameHandle(hwndNext); 1291 if(!window) { 1292 //OS/2 window or non-frame window, so skip it 1293 continue; 1294 } 1329 1295 } 1330 1296 if((rc = lpfn(window->getWindowHandle(), lParam)) == FALSE) … … 1352 1318 while ((hwndNext = OSLibWinGetNextWindow(henum)) != 0) 1353 1319 { 1354 window = Win32BaseWindow::GetWindowFrom Handle(hwndNext);1320 window = Win32BaseWindow::GetWindowFromOS2Handle(hwndNext); 1355 1321 if(window == NULL) { 1356 //OS/2 window or non-frame window, so skip it 1357 continue; 1322 window = Win32BaseWindow::GetWindowFromOS2FrameHandle(hwndNext); 1323 if(!window) { 1324 //OS/2 window or non-frame window, so skip it 1325 continue; 1326 } 1358 1327 } 1359 1328 if((rc = lpfn(window->getWindowHandle(), lParam)) == FALSE) { … … 1374 1343 //****************************************************************************** 1375 1344 //****************************************************************************** 1376 #if 01377 BOOL WIN32API GetUpdateRect( HWND hwnd, PRECT lpRect, BOOL bErase)1378 {1379 dprintf(("GetUpdateRect %x %d\n", hwnd, bErase));1380 if (!lpRect) return FALSE;1381 1382 return OSLibWinQueryUpdateRect(Win32BaseWindow::Win32ToOS2Handle(hwnd), lpRect);1383 }1384 #endif1385 //******************************************************************************1386 //******************************************************************************1387 #if 01388 BOOL WIN32API InvalidateRect(HWND hWnd, const RECT *lpRect, BOOL bErase)1389 {1390 #ifdef DEBUG1391 if(lpRect)1392 WriteLog("USER32: InvalidateRect for window %X (%d,%d)(%d,%d) %d\n", hWnd, lpRect->left, lpRect->top, lpRect->right, lpRect->bottom, bErase);1393 else WriteLog("USER32: InvalidateRect for window %X NULL, %d\n", hWnd, bErase);1394 #endif1395 1396 //CB: bErase no quite the same1397 hWnd = Win32BaseWindow::Win32ToOS2Handle(hWnd);1398 if (lpRect)1399 {1400 return OSLibWinInvalidateRect(hWnd, (PRECT)lpRect, bErase);1401 }1402 else return OSLibWinInvalidateRect(hWnd,NULL,bErase);1403 }1404 #endif1405 //******************************************************************************1406 //******************************************************************************1407 1345 UINT WIN32API ArrangeIconicWindows( HWND arg1) 1408 1346 {
Note:
See TracChangeset
for help on using the changeset viewer.