Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/button.c | 4 ++++ dlls/comctl32/tests/button.c | 18 +++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index b0eea996a4..a39a64c9a3 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -237,12 +237,16 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L case WM_GETDLGCODE: switch(btn_type) { + case BS_COMMANDLINK: case BS_USERBUTTON: case BS_PUSHBUTTON: return DLGC_BUTTON | DLGC_UNDEFPUSHBUTTON; + case BS_DEFCOMMANDLINK: case BS_DEFPUSHBUTTON: return DLGC_BUTTON | DLGC_DEFPUSHBUTTON; case BS_RADIOBUTTON: case BS_AUTORADIOBUTTON: return DLGC_BUTTON | DLGC_RADIOBUTTON; case BS_GROUPBOX: return DLGC_STATIC; + case BS_SPLITBUTTON: return DLGC_BUTTON | DLGC_UNDEFPUSHBUTTON | DLGC_WANTARROWS; + case BS_DEFSPLITBUTTON: return DLGC_BUTTON | DLGC_DEFPUSHBUTTON | DLGC_WANTARROWS; default: return DLGC_BUTTON; }
diff --git a/dlls/comctl32/tests/button.c b/dlls/comctl32/tests/button.c index 38e55c8f69..f2f081dc2f 100644 --- a/dlls/comctl32/tests/button.c +++ b/dlls/comctl32/tests/button.c @@ -511,6 +511,18 @@ static void test_button_messages(void) { BS_OWNERDRAW, DLGC_BUTTON, setfocus_ownerdraw_seq, killfocus_ownerdraw_seq, setstyle_ownerdraw_seq, setstate_ownerdraw_seq, clearstate_ownerdraw_seq, setcheck_ignored_seq }, + { BS_SPLITBUTTON, DLGC_BUTTON | DLGC_UNDEFPUSHBUTTON | DLGC_WANTARROWS, + setfocus_seq, killfocus_seq, setstyle_seq, + setstate_seq, setstate_seq, setcheck_ignored_seq }, + { BS_DEFSPLITBUTTON, DLGC_BUTTON | DLGC_DEFPUSHBUTTON | DLGC_WANTARROWS, + setfocus_seq, killfocus_seq, setstyle_seq, + setstate_seq, setstate_seq, setcheck_ignored_seq }, + { BS_COMMANDLINK, DLGC_BUTTON | DLGC_UNDEFPUSHBUTTON, + setfocus_seq, killfocus_seq, setstyle_seq, + setstate_seq, setstate_seq, setcheck_ignored_seq }, + { BS_DEFCOMMANDLINK, DLGC_BUTTON | DLGC_DEFPUSHBUTTON, + setfocus_seq, killfocus_seq, setstyle_seq, + setstate_seq, setstate_seq, setcheck_ignored_seq }, }; const struct message *seq; unsigned int i; @@ -650,7 +662,11 @@ static void test_button_messages(void) button[i].style == BS_DEFPUSHBUTTON || button[i].style == BS_GROUPBOX || button[i].style == BS_USERBUTTON || - button[i].style == BS_OWNERDRAW) + button[i].style == BS_OWNERDRAW || + button[i].style == BS_SPLITBUTTON || + button[i].style == BS_DEFSPLITBUTTON || + button[i].style == BS_COMMANDLINK || + button[i].style == BS_DEFCOMMANDLINK) { ok_sequence(sequences, COMBINED_SEQ_INDEX, button[i].setcheck, "BM_SETCHECK on a button", FALSE); state = SendMessageA(hwnd, BM_GETCHECK, 0, 0);