mirror of
https://github.com/reactos/reactos.git
synced 2024-07-18 02:16:14 +00:00
don't close a dialog with <Return> when the OK button is disabled
svn path=/trunk/; revision=41334
This commit is contained in:
parent
12c11159c8
commit
39e6a334c2
|
@ -2376,6 +2376,10 @@ IsDialogMessageW(
|
|||
}
|
||||
else if (DC_HASDEFID == HIWORD(dw = SendMessageW (hDlg, DM_GETDEFID, 0, 0)))
|
||||
{
|
||||
HWND hwndDef = GetDlgItem(hDlg, LOWORD(dw));
|
||||
if (!hwndDef || !IsWindowEnabled(hwndDef))
|
||||
return TRUE;
|
||||
|
||||
SendMessageW( hDlg, WM_COMMAND, MAKEWPARAM( LOWORD(dw), BN_CLICKED ),
|
||||
(LPARAM)GetDlgItem(hDlg, LOWORD(dw)));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue