[COMCTL32] - A button with the style BS_DEFPUSHBUTTON is drawn as defaulted instead...
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 5 Mar 2017 09:35:12 +0000 (09:35 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 5 Mar 2017 09:35:12 +0000 (09:35 +0000)
svn path=/trunk/; revision=74074

reactos/dll/win32/comctl32/theme_button.c

index b1afa58..4fd38d6 100644 (file)
@@ -361,6 +361,11 @@ BOOL BUTTON_PaintWithTheme(HTHEME theme, HWND hwnd, HDC hParamDC, LPARAM prfFlag
     }
     else drawState = STATE_DISABLED;
 
+    if (drawState == STATE_NORMAL && (dwStyle & BUTTON_TYPE) == BS_DEFPUSHBUTTON)
+    {
+        drawState = STATE_DEFAULTED;
+    }
+
     paint(theme, hwnd, hParamDC, drawState, dtFlags, state & BST_FOCUS, prfFlag);
     return TRUE;
 }