Ignore:
Timestamp:
Oct 18, 1999, 1:59:58 PM (26 years ago)
Author:
sandervl
Message:

Listbox changes + EnumChildWindow rewrite

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/win32wbase.cpp

    r1348 r1351  
    1 /* $Id: win32wbase.cpp,v 1.53 1999-10-18 10:54:04 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.54 1999-10-18 11:59:58 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    607607  {
    608608        hwndHorzScroll = OSLibWinQueryScrollBarHandle(OS2HwndFrame, OSLIB_HSCROLL);
    609         OSLibWinShowScrollBar(OS2HwndFrame, hwndHorzScroll, OSLIB_HSCROLL, FALSE, TRUE);
     609//        OSLibWinShowScrollBar(OS2HwndFrame, hwndHorzScroll, OSLIB_HSCROLL, FALSE, TRUE);
    610610  }
    611611
    612612  if (dwStyle & WS_VSCROLL) {
    613613        hwndVertScroll = OSLibWinQueryScrollBarHandle(OS2HwndFrame, OSLIB_VSCROLL);
    614         OSLibWinShowScrollBar(OS2HwndFrame, hwndVertScroll, OSLIB_VSCROLL, FALSE, TRUE);
     614//        OSLibWinShowScrollBar(OS2HwndFrame, hwndVertScroll, OSLIB_VSCROLL, FALSE, TRUE);
    615615  }
    616616
     
    21712171}
    21722172//******************************************************************************
     2173//TODO: Should not enumerate children that are created during the enumeration!
     2174//******************************************************************************
     2175BOOL Win32BaseWindow::EnumChildWindows(WNDENUMPROC lpfn, LPARAM lParam)
     2176{
     2177 BOOL rc = TRUE;
     2178 HWND hwnd;
     2179 Win32BaseWindow *prevchild = 0, *child = 0;
     2180
     2181        dprintf(("EnumChildWindows of %x parameter %x %x (%x)", getWindowHandle(), lpfn, lParam, getFirstChild()));
     2182    for (child = (Win32BaseWindow *)getFirstChild(); child; child = (Win32BaseWindow *)child->getNextChild())
     2183    {
     2184        dprintf(("EnumChildWindows: enumerating child %x", child->getWindowHandle()));
     2185        hwnd = child->getWindowHandle();
     2186        if(lpfn(hwnd, lParam) == FALSE)
     2187        {
     2188                rc = FALSE;
     2189                break;
     2190        }
     2191        //check if the window still exists
     2192        if(!::IsWindow(hwnd))
     2193        {
     2194            child = prevchild;
     2195            continue;
     2196        }
     2197        if(child->getFirstChild() != NULL)
     2198        {
     2199            dprintf(("EnumChildWindows: Enumerate children of %x", child->getWindowHandle()));
     2200            if(child->EnumChildWindows(lpfn, lParam) == FALSE)
     2201            {
     2202                rc = FALSE;
     2203                break;
     2204            }
     2205        }
     2206        prevchild = child;
     2207    }
     2208    return rc;
     2209}
     2210//******************************************************************************
    21732211//******************************************************************************
    21742212Win32BaseWindow *Win32BaseWindow::FindWindowById(int id)
Note: See TracChangeset for help on using the changeset viewer.