André Hentschel : user32: Don' t paint new button styles instead of crashing.

Alexandre Julliard julliard at winehq.org
Thu Dec 2 16:30:53 CST 2010


Module: wine
Branch: stable
Commit: a15c44910ecbff3a30f6038793acc1ddf730d0fa
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a15c44910ecbff3a30f6038793acc1ddf730d0fa

Author: André Hentschel <nerv at dawncrow.de>
Date:   Wed Nov  3 21:15:42 2010 +0100

user32: Don't paint new button styles instead of crashing.
(cherry picked from commit e054fc23100f347ae3ed026d24f183aa85b8c802)

---

 dlls/user32/button.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/user32/button.c b/dlls/user32/button.c
index 54d54dc..463c37f 100644
--- a/dlls/user32/button.c
+++ b/dlls/user32/button.c
@@ -114,7 +114,7 @@ static void UB_Paint( HWND hwnd, HDC hDC, UINT action );
 static void OB_Paint( HWND hwnd, HDC hDC, UINT action );
 static void BUTTON_CheckAutoRadioButton( HWND hwnd );
 
-#define MAX_BTN_TYPE  12
+#define MAX_BTN_TYPE  16
 
 static const WORD maxCheckState[MAX_BTN_TYPE] =
 {
@@ -128,7 +128,7 @@ static const WORD maxCheckState[MAX_BTN_TYPE] =
     BUTTON_UNCHECKED,   /* BS_GROUPBOX */
     BUTTON_UNCHECKED,   /* BS_USERBUTTON */
     BUTTON_CHECKED,     /* BS_AUTORADIOBUTTON */
-    BUTTON_UNCHECKED,   /* Not defined */
+    BUTTON_UNCHECKED,   /* BS_PUSHBOX */
     BUTTON_UNCHECKED    /* BS_OWNERDRAW */
 };
 
@@ -146,7 +146,7 @@ static const pfPaint btnPaintFunc[MAX_BTN_TYPE] =
     GB_Paint,    /* BS_GROUPBOX */
     UB_Paint,    /* BS_USERBUTTON */
     CB_Paint,    /* BS_AUTORADIOBUTTON */
-    NULL,        /* Not defined */
+    NULL,        /* BS_PUSHBOX */
     OB_Paint     /* BS_OWNERDRAW */
 };
 




More information about the wine-cvs mailing list