Revert previous change to dialog.c and fix the problem at it's root,

in EnumChildWindows. Thanks to Thomas Weidenmueller.

svn path=/trunk/; revision=6101
This commit is contained in:
Gé van Geldorp 2003-09-20 19:52:23 +00:00
parent 0504e0cffa
commit b2869f7a74
2 changed files with 7 additions and 4 deletions

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: dialog.c,v 1.18 2003/09/20 19:24:11 gvg Exp $
/* $Id: dialog.c,v 1.19 2003/09/20 19:52:23 gvg Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/dialog.c
@ -1699,7 +1699,7 @@ GetDlgItem(
GETDLGITEMINFO info;
info.nIDDlgItem = nIDDlgItem;
info.control = 0;
if(hDlg && EnumChildWindows(hDlg, (ENUMWINDOWSPROC)&GetDlgItemEnumProc, (LPARAM)&info))
if(hDlg && !EnumChildWindows(hDlg, (ENUMWINDOWSPROC)&GetDlgItemEnumProc, (LPARAM)&info))
return info.control;
else
return 0;

View file

@ -1,4 +1,4 @@
/* $Id: window.c,v 1.72 2003/09/13 13:58:38 weiden Exp $
/* $Id: window.c,v 1.73 2003/09/20 19:52:23 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
@ -844,7 +844,10 @@ User32EnumWindows (
if ( !(ULONG)pHwnd[i] ) /* don't enumerate a NULL HWND */
continue;
if ( !(*lpfn)( pHwnd[i], lParam ) )
break;
{
HeapFree ( hHeap, 0, pHwnd );
return FALSE;
}
}
if ( pHwnd )
HeapFree ( hHeap, 0, pHwnd );