- [User32] Patch by Dmitry Timoshkov : IsDialogMessage should allow control ids other...
authorJames Tabor <james.tabor@reactos.org>
Thu, 17 May 2012 17:54:09 +0000 (17:54 +0000)
committerJames Tabor <james.tabor@reactos.org>
Thu, 17 May 2012 17:54:09 +0000 (17:54 +0000)
svn path=/trunk/; revision=56604

reactos/win32ss/user/user32/windows/dialog.c

index 8285ccf..d65e14d 100644 (file)
@@ -2561,7 +2561,7 @@ IsDialogMessageW(
                  else if (DC_HASDEFID == HIWORD(dw = SendMessageW (hDlg, DM_GETDEFID, 0, 0)))
                  {
                     HWND hwndDef = DIALOG_IdToHwnd(hDlg, LOWORD(dw));
                  else if (DC_HASDEFID == HIWORD(dw = SendMessageW (hDlg, DM_GETDEFID, 0, 0)))
                  {
                     HWND hwndDef = DIALOG_IdToHwnd(hDlg, LOWORD(dw));
-                    if (hwndDef ? IsWindowEnabled(hwndDef) : LOWORD(dw)==IDOK)
+                    if (!hwndDef || IsWindowEnabled(hwndDef))
                         SendMessageW( hDlg, WM_COMMAND, MAKEWPARAM( LOWORD(dw), BN_CLICKED ), (LPARAM)hwndDef);
                  }
                  else
                         SendMessageW( hDlg, WM_COMMAND, MAKEWPARAM( LOWORD(dw), BN_CLICKED ), (LPARAM)hwndDef);
                  }
                  else