Changeset 1949 for trunk/src/user32/win32wbase.cpp
- Timestamp:
- Dec 2, 1999, 8:30:41 PM (26 years ago)
- File:
-
- 1 edited
-
trunk/src/user32/win32wbase.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbase.cpp
r1926 r1949 1 /* $Id: win32wbase.cpp,v 1.10 1 1999-12-01 18:43:08sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.102 1999-12-02 19:30:40 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 415 415 else 416 416 { 417 SetParent(0); 417 418 if (!cs->hwndParent || cs->hwndParent == windowDesktop->getWindowHandle()) { 418 419 owner = NULL; … … 2447 2448 //****************************************************************************** 2448 2449 //****************************************************************************** 2450 Win32BaseWindow *Win32BaseWindow::getParent() 2451 { 2452 Win32BaseWindow *wndparent = (Win32BaseWindow *)ChildWindow::GetParent(); 2453 return ((ULONG)wndparent == (ULONG)windowDesktop) ? NULL : wndparent; 2454 } 2455 //****************************************************************************** 2456 //****************************************************************************** 2449 2457 HWND Win32BaseWindow::GetParent() 2450 2458 { 2451 if(getParent()) { 2452 return getParent()->getWindowHandle(); 2453 } 2454 else return 0; 2459 Win32BaseWindow *wndparent; 2460 2461 if ((!(getStyle() & (WS_POPUP|WS_CHILD)))) 2462 { 2463 return 0; 2464 } 2465 wndparent = ((getStyle() & WS_CHILD) ? getParent() : getOwner()); 2466 2467 return (wndparent) ? wndparent->getWindowHandle() : 0; 2455 2468 } 2456 2469 //****************************************************************************** … … 2476 2489 } 2477 2490 else { 2478 setParent(windowDesktop);2479 getParent()->AddChild(this);2491 setParent(windowDesktop); 2492 windowDesktop->AddChild(this); 2480 2493 OSLibWinSetParent(getOS2FrameWindowHandle(), OSLIB_HWND_DESKTOP); 2481 2494 return oldhwnd; … … 2557 2570 dprintf(("EnumChildWindows: enumerating child %x", child->getWindowHandle())); 2558 2571 hwnd = child->getWindowHandle(); 2572 if(child->getOwner()) { 2573 continue; //shouldn't have an owner (Wine) 2574 } 2559 2575 if(lpfn(hwnd, lParam) == FALSE) 2560 2576 { … … 2580 2596 } 2581 2597 return rc; 2598 } 2599 //****************************************************************************** 2600 //Enumerate first-level children only and check thread id 2601 //****************************************************************************** 2602 BOOL Win32BaseWindow::EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam) 2603 { 2604 Win32BaseWindow *child = 0; 2605 ULONG tid, pid; 2606 BOOL rc; 2607 HWND hwnd; 2608 2609 dprintf(("EnumThreadWindows %x %x %x", dwThreadId, lpfn, lParam)); 2610 2611 for (child = (Win32BaseWindow *)getFirstChild(); child; child = (Win32BaseWindow *)child->getNextChild()) 2612 { 2613 OSLibWinQueryWindowProcess(child->getOS2WindowHandle(), &pid, &tid); 2614 2615 if(dwThreadId == tid) { 2616 dprintf2(("EnumThreadWindows: Found Window %x", child->getWindowHandle())); 2617 if((rc = lpfn(child->getWindowHandle(), lParam)) == FALSE) { 2618 break; 2619 } 2620 } 2621 } 2622 return TRUE; 2623 } 2624 //****************************************************************************** 2625 //Enumerate first-level children only 2626 //****************************************************************************** 2627 BOOL Win32BaseWindow::EnumWindows(WNDENUMPROC lpfn, LPARAM lParam) 2628 { 2629 Win32BaseWindow *child = 0; 2630 BOOL rc; 2631 HWND hwnd; 2632 2633 dprintf(("EnumWindows %x %x", lpfn, lParam)); 2634 2635 for (child = (Win32BaseWindow *)getFirstChild(); child; child = (Win32BaseWindow *)child->getNextChild()) 2636 { 2637 hwnd = child->getWindowHandle(); 2638 2639 dprintf2(("EnumWindows: Found Window %x", child->getWindowHandle())); 2640 if((rc = lpfn(child->getWindowHandle(), lParam)) == FALSE) { 2641 break; 2642 } 2643 } 2644 return TRUE; 2582 2645 } 2583 2646 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.
