Commit 287c5a25 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/button: Invalidate on BM_SETCHECK.

parent f8eb74e1
......@@ -663,7 +663,7 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
if ((state & 3) != wParam)
{
set_button_state( hWnd, (state & ~3) | wParam );
paint_button( hWnd, btn_type, ODA_SELECT );
InvalidateRect( hWnd, NULL, FALSE );
}
if ((btn_type == BS_AUTORADIOBUTTON) && (wParam == BST_CHECKED) && (style & WS_CHILD))
BUTTON_CheckAutoRadioButton( hWnd );
......
......@@ -440,8 +440,7 @@ static const struct message setcheck_radio_redraw_seq[] =
{ WM_STYLECHANGED, sent|wparam|defwinproc, GWL_STYLE },
{ WM_APP, sent|wparam|lparam, 0, 0 },
{ WM_PAINT, sent },
{ WM_NCPAINT, sent|optional }, /* FIXME: Wine sends it */
{ WM_ERASEBKGND, sent|defwinproc|optional },
{ WM_NCPAINT, sent|defwinproc|optional }, /* FIXME: Wine sends it */
{ 0 }
};
......@@ -661,7 +660,9 @@ static void test_button_messages(void)
SendMessageA(hwnd, BM_SETCHECK, BST_CHECKED, 0);
SendMessageA(hwnd, WM_APP, 0, 0); /* place a separator mark here */
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
ok_sequence(sequences, COMBINED_SEQ_INDEX, button[i].setcheck, "BM_SETCHECK on a button", FALSE);
state = SendMessageA(hwnd, BM_GETCHECK, 0, 0);
if (button[i].style == BS_PUSHBUTTON ||
button[i].style == BS_DEFPUSHBUTTON ||
button[i].style == BS_GROUPBOX ||
......@@ -672,16 +673,10 @@ static void test_button_messages(void)
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);
ok(state == BST_UNCHECKED, "expected check BST_UNCHECKED, got %04x\n", state);
}
else
{
ok_sequence(sequences, COMBINED_SEQ_INDEX, button[i].setcheck, "BM_SETCHECK on a button", TRUE);
state = SendMessageA(hwnd, BM_GETCHECK, 0, 0);
ok(state == BST_CHECKED, "expected check BST_CHECKED, got %04x\n", state);
}
style = GetWindowLongA(hwnd, GWL_STYLE);
style &= ~(WS_CHILD | BS_NOTIFY | WS_VISIBLE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment