diff --git a/controls/static.c b/controls/static.c index 28857386a4e80cff4fdf6ea316256ca9ff9d06ea..40837bba20ee8d67d4a17b61e81079af77cd83b7 100644 --- a/controls/static.c +++ b/controls/static.c @@ -322,20 +322,18 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, case WM_SETFONT: if ((style == SS_ICON) || (style == SS_BITMAP)) return 0; SetWindowLongA( hwnd, HFONT_GWL_OFFSET, wParam ); + if (!LOWORD(lParam)) break; /* don't refresh */ switch (style) { case SS_LEFT: case SS_CENTER: case SS_RIGHT: case SS_SIMPLE: case SS_LEFTNOWORDWRAP: - { - if (uMsg == WM_SETTEXT) - STATIC_TryPaintFcn( hwnd, full_style ); + STATIC_TryPaintFcn( hwnd, full_style ); break; - } default: - if (LOWORD(lParam)) - InvalidateRect( hwnd, NULL, FALSE ); + InvalidateRect( hwnd, NULL, FALSE ); + break; } break;