Commit 6fb62f52 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Correct the behaviour of the accelerator keys in dialogs according to

the Windows' one.
parent 97d05c80
......@@ -265,6 +265,11 @@ static inline LRESULT WINAPI ButtonWndProc_locked(WND* wndPtr, UINT uMsg,
PAINT_BUTTON( wndPtr, style, ODA_DRAWENTIRE );
break;
case BM_CLICK:
SendMessageA( hWnd, WM_LBUTTONDOWN, 0, 0 );
SendMessageA( hWnd, WM_LBUTTONUP, 0, 0 );
break;
case BM_SETIMAGE:
oldHbitmap = infoPtr->hImage;
if ((wndPtr->dwStyle & BS_BITMAP) || (wndPtr->dwStyle & BS_ICON))
......
......@@ -1174,10 +1174,8 @@ static BOOL DIALOG_IsAccelerator( HWND hwnd, HWND hwndDlg, WPARAM vKey )
}
else if (dlgCode & DLGC_BUTTON)
{
/* send command message as from the control */
SendMessageA( hwndDlg, WM_COMMAND,
MAKEWPARAM( LOWORD(wndPtr->wIDmenu), BN_CLICKED ),
(LPARAM)hwndControl );
/* send BM_CLICK message to the control */
SendMessageA( hwndControl, BM_CLICK, 0, 0 );
}
RetVal = TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment