user32: Make clear what DEFDLG_FindDefButton does

André Hentschel nerv at dawncrow.de
Thu Jul 21 13:27:22 CDT 2011


---
 dlls/user32/defdlg.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/user32/defdlg.c b/dlls/user32/defdlg.c
index fecd417..730bfd9 100644
--- a/dlls/user32/defdlg.c
+++ b/dlls/user32/defdlg.c
@@ -117,7 +117,7 @@ static HWND DEFDLG_FindDefButton( HWND hwndDlg )
     while (hwndChild)
     {
         if (SendMessageW( hwndChild, WM_GETDLGCODE, 0, 0 ) & DLGC_DEFPUSHBUTTON)
-            break;
+            return hwndChild;
 
         /* Recurse into WS_EX_CONTROLPARENT controls */
         if (GetWindowLongW( hwndChild, GWL_EXSTYLE ) & WS_EX_CONTROLPARENT)
@@ -129,7 +129,7 @@ static HWND DEFDLG_FindDefButton( HWND hwndDlg )
         }
         hwndChild = GetWindow( hwndChild, GW_HWNDNEXT );
     }
-    return hwndChild;
+    return NULL;
 }
 
 
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list