Improving keyboard handling, including accelerator keys in dialog
boxes. Also fixes enter key in Agent32 edit box.

diff --git a/controls/button.c b/controls/button.c
index 9c8b60d..1fd7798 100644
--- a/controls/button.c
+++ b/controls/button.c
@@ -187,6 +187,10 @@
 
     case WM_SETFOCUS:
         infoPtr->state |= BUTTON_HASFOCUS;
+	if (style == BS_AUTORADIOBUTTON)
+	{
+	    SendMessage32A( hWnd, BM_SETCHECK32, 1, 0 );
+	}
         PAINT_BUTTON( wndPtr, style, ODA_FOCUS );
         break;
 
@@ -218,6 +222,13 @@
         if (wParam > maxCheckState[style]) wParam = maxCheckState[style];
         if ((infoPtr->state & 3) != wParam)
         {
+	    if ((style == BS_RADIOBUTTON) || (style == BS_AUTORADIOBUTTON))
+	    {
+		if (wParam)
+		    wndPtr->dwStyle |= WS_TABSTOP;
+		else
+		    wndPtr->dwStyle &= ~WS_TABSTOP;
+	    }
             infoPtr->state = (infoPtr->state & ~3) | wParam;
             PAINT_BUTTON( wndPtr, style, ODA_SELECT );
         }