user32: WM_SETFONT on button doesn't repaint directly.
This commit is contained in:
parent
a06821765a
commit
f3bcc0c4f8
|
@ -410,7 +410,7 @@ static LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
|
||||||
|
|
||||||
case WM_SETFONT:
|
case WM_SETFONT:
|
||||||
set_button_font( hWnd, (HFONT)wParam );
|
set_button_font( hWnd, (HFONT)wParam );
|
||||||
if (lParam) paint_button( hWnd, btn_type, ODA_DRAWENTIRE );
|
if (lParam) InvalidateRect(hWnd, NULL, TRUE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_GETFONT:
|
case WM_GETFONT:
|
||||||
|
|
|
@ -4229,6 +4229,14 @@ static const struct message WmLButtonUpSeq[] =
|
||||||
{ WM_CAPTURECHANGED, sent|wparam|defwinproc, 0 },
|
{ WM_CAPTURECHANGED, sent|wparam|defwinproc, 0 },
|
||||||
{ 0 }
|
{ 0 }
|
||||||
};
|
};
|
||||||
|
static const struct message WmSetFontButtonSeq[] =
|
||||||
|
{
|
||||||
|
{ WM_SETFONT, sent },
|
||||||
|
{ WM_PAINT, sent },
|
||||||
|
{ WM_ERASEBKGND, sent|defwinproc },
|
||||||
|
{ WM_CTLCOLORBTN, sent|defwinproc },
|
||||||
|
{ 0 }
|
||||||
|
};
|
||||||
|
|
||||||
static WNDPROC old_button_proc;
|
static WNDPROC old_button_proc;
|
||||||
|
|
||||||
|
@ -4309,6 +4317,7 @@ static void test_button_messages(void)
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
DWORD dlg_code;
|
DWORD dlg_code;
|
||||||
|
HFONT zfont;
|
||||||
|
|
||||||
subclass_button();
|
subclass_button();
|
||||||
|
|
||||||
|
@ -4348,6 +4357,13 @@ static void test_button_messages(void)
|
||||||
|
|
||||||
SendMessageA(hwnd, WM_LBUTTONUP, 0, 0);
|
SendMessageA(hwnd, WM_LBUTTONUP, 0, 0);
|
||||||
ok_sequence(WmLButtonUpSeq, "WM_LBUTTONUP on a button", FALSE);
|
ok_sequence(WmLButtonUpSeq, "WM_LBUTTONUP on a button", FALSE);
|
||||||
|
|
||||||
|
flush_sequence();
|
||||||
|
zfont = (HFONT)GetStockObject(SYSTEM_FONT);
|
||||||
|
SendMessageA(hwnd, WM_SETFONT, (WPARAM)zfont, TRUE);
|
||||||
|
UpdateWindow(hwnd);
|
||||||
|
ok_sequence(WmSetFontButtonSeq, "WM_SETFONT on a button", FALSE);
|
||||||
|
|
||||||
DestroyWindow(hwnd);
|
DestroyWindow(hwnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue