user32: Don't paint new Button styles instead of crashing
André Hentschel
nerv at dawncrow.de
Wed Nov 3 15:15:42 CDT 2010
For bug 24952
http://bugs.winehq.org/show_bug.cgi?id=24952
---
dlls/user32/button.c | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/dlls/user32/button.c b/dlls/user32/button.c
index 2fc4706..3844110 100644
--- a/dlls/user32/button.c
+++ b/dlls/user32/button.c
@@ -113,7 +113,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] =
{
@@ -127,8 +127,12 @@ 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_OWNERDRAW */
+ BUTTON_UNCHECKED, /* BS_PUSHBOX */
+ BUTTON_UNCHECKED, /* BS_OWNERDRAW */
+ BUTTON_UNCHECKED, /* BS_SPLITBUTTON */
+ BUTTON_UNCHECKED, /* BS_DEFSPLITBUTTON */
+ BUTTON_UNCHECKED, /* BS_COMMANDLINK */
+ BUTTON_UNCHECKED /* BS_DEFCOMMANDLINK */
};
typedef void (*pfPaint)( HWND hwnd, HDC hdc, UINT action );
@@ -145,8 +149,12 @@ static const pfPaint btnPaintFunc[MAX_BTN_TYPE] =
GB_Paint, /* BS_GROUPBOX */
UB_Paint, /* BS_USERBUTTON */
CB_Paint, /* BS_AUTORADIOBUTTON */
- NULL, /* Not defined */
- OB_Paint /* BS_OWNERDRAW */
+ NULL, /* BS_PUSHBOX */
+ OB_Paint, /* BS_OWNERDRAW */
+ NULL, /* BS_SPLITBUTTON */
+ NULL, /* BS_DEFSPLITBUTTON */
+ NULL, /* BS_COMMANDLINK */
+ NULL /* BS_DEFCOMMANDLINK */
};
static HBITMAP hbitmapCheckBoxes = 0;
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list