Zhiyi Zhang : comctl32/button: Use correct state for BS_3STATE and BS_AUTO3STATE buttons.

Alexandre Julliard julliard at winehq.org
Thu Nov 11 16:01:28 CST 2021


Module: wine
Branch: master
Commit: a7f6d78406b536bd87b608856628f93d94e7a8dd
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=a7f6d78406b536bd87b608856628f93d94e7a8dd

Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date:   Thu Nov 11 15:03:45 2021 +0800

comctl32/button: Use correct state for BS_3STATE and BS_AUTO3STATE buttons.

BS_3STATE and BS_AUTO3STATE are check boxes. Fix BS_3STATE and BS_AUTO3STATE buttons drawing
indeterminate state as unchecked.

Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/comctl32/button.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c
index 19febd8b6ac..b612273c0c1 100644
--- a/dlls/comctl32/button.c
+++ b/dlls/comctl32/button.c
@@ -427,10 +427,10 @@ static int get_draw_state(const BUTTON_INFO *infoPtr)
         return pb_states[state];
     case BS_CHECKBOX:
     case BS_AUTOCHECKBOX:
-        return cb_states[check_state][state];
-    case BS_RADIOBUTTON:
     case BS_3STATE:
     case BS_AUTO3STATE:
+        return cb_states[check_state][state];
+    case BS_RADIOBUTTON:
     case BS_AUTORADIOBUTTON:
         return rb_states[check_state][state];
     case BS_GROUPBOX:




More information about the wine-cvs mailing list