Changeset 4825 for trunk/src/user32/window.cpp
- Timestamp:
- Dec 17, 2000, 4:04:14 PM (25 years ago)
- File:
-
- 1 edited
-
trunk/src/user32/window.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/window.cpp
r4585 r4825 1 /* $Id: window.cpp,v 1.8 4 2000-11-11 18:39:31sandervl Exp $ */1 /* $Id: window.cpp,v 1.85 2000-12-17 15:04:13 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 1391 1391 } 1392 1392 1393 1394 1393 // get first child 1395 1394 hWnd = GetWindow (hwndParent, GW_CHILD); 1396 1395 1397 while (hWnd != NULL) {1398 1396 while (hWnd != NULL) 1397 { 1399 1398 // do I need to skip this window? 1400 1399 if (((uFlags & CWP_SKIPINVISIBLE) && … … 1404 1403 ((uFlags & CWP_SKIPTRANSPARENT) && 1405 1404 (GetWindowLongA (hWnd, GWL_EXSTYLE) & WS_EX_TRANSPARENT))) 1406 1407 1405 { 1408 1406 hWnd = GetWindow (hWnd, GW_HWNDNEXT); … … 1421 1419 return hWnd; 1422 1420 } 1423 1424 1421 // the point is in the parentwindow but the parentwindow has no child 1425 1422 // at this coordinate 1426 dprintf(("ChildWindowFromPointEx returned parent %x", hwndParent));1423 dprintf(("ChildWindowFromPointEx returned parent %x", hwndParent)); 1427 1424 return hwndParent; 1428 1425 } … … 1447 1444 HWND WIN32API WindowFromPoint( POINT point) 1448 1445 { 1446 #if 0 1447 INT hittest = HTERROR; 1448 HWND retvalue = 0; 1449 HWND hwnd = GetDesktopWindow(); 1450 DWORD dwStyle; 1451 RECT rectWindow, rectClient; 1452 Win32BaseWindow *window; 1453 1454 dprintf(("WindowFromPoint (%d,%d)", point.x, point.y)); 1455 1456 while(hwnd) 1457 { 1458 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 1459 1460 /* If point is in window, and window is visible, and it */ 1461 /* is enabled (or it's a top-level window), then explore */ 1462 /* its children. Otherwise, go to the next window. */ 1463 dwStyle = GetWindowLongA(hwnd, GWL_STYLE); 1464 1465 if ((dwStyle & WS_VISIBLE) && (!(dwStyle & WS_DISABLED) || 1466 ((dwStyle & (WS_POPUP | WS_CHILD)) != WS_CHILD))) 1467 { 1468 GetWindowRect(hwnd, &rectWindow); 1469 if(PtInRect(&rectWindow, point) == TRUE) 1470 { 1471 /* If window is minimized or disabled, return at once */ 1472 if(dwStyle & WS_MINIMIZE) 1473 { 1474 break; 1475 } 1476 if(dwStyle & WS_DISABLED) 1477 { 1478 break; 1479 } 1480 retvalue = hwnd; 1481 1482 GetClientRect(hwnd, &rectClient); 1483 InflateRect(&rectClient, rectWindow.left, rectWindow.top); 1484 1485 /* If point is not in client area, ignore the children */ 1486 if(PtInRect(&rectClient, point) == FALSE) { 1487 break; 1488 } 1489 if(window->getFirstChild()) { 1490 hwnd = ((Win32BaseWindow *)window->getFirstChild())->getWindowHandle(); 1491 } 1492 else break; 1493 } 1494 else 1495 { 1496 if(window->getNextChild()) { 1497 hwnd = ((Win32BaseWindow *)window->getNextChild())->getWindowHandle(); 1498 } 1499 else hwnd = 0; 1500 } 1501 } 1502 else 1503 { 1504 if(window->getNextChild()) { 1505 hwnd = ((Win32BaseWindow *)window->getNextChild())->getWindowHandle(); 1506 } 1507 else hwnd = 0; 1508 } 1509 } 1510 1511 dprintf(("WindowFromPoint (%d,%d) -> %x", point.x, point.y, hwnd)); 1512 return retvalue; 1513 #else 1449 1514 HWND hwndOS2, hwnd; 1450 1515 POINT wPoint; … … 1464 1529 dprintf(("WindowFromPoint (%d,%d) %x->1\n", point.x, point.y, hwndOS2)); 1465 1530 return windowDesktop->getWindowHandle(); 1531 #endif 1466 1532 } 1467 1533 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.
