[2/3] user32: First search for other default buttons if the detected one is IDOK

André Hentschel nerv at dawncrow.de
Thu Jul 21 16:02:22 CDT 2011


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

diff --git a/dlls/user32/defdlg.c b/dlls/user32/defdlg.c
index fecd417..df87165 100644
--- a/dlls/user32/defdlg.c
+++ b/dlls/user32/defdlg.c
@@ -267,10 +267,12 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
             if (dlgInfo && !(dlgInfo->flags & DF_END))
             {
                 HWND hwndDefId;
+
+                if ((dlgInfo->idResult == IDOK || !dlgInfo->idResult) &&
+                    (hwndDefId = DEFDLG_FindDefButton( hwnd )))
+                    return MAKELONG( GetDlgCtrlID( hwndDefId ), DC_HASDEFID);
                 if (dlgInfo->idResult)
                     return MAKELONG( dlgInfo->idResult, DC_HASDEFID );
-                if ((hwndDefId = DEFDLG_FindDefButton( hwnd )))
-                    return MAKELONG( GetDlgCtrlID( hwndDefId ), DC_HASDEFID);
             }
             return 0;
 
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list