comctl32: Repaint after the WM_THEMECHANGED message is received.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a9eaf7a7da
commit
6576d461b8
|
@ -534,6 +534,7 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
|
|||
theme = GetWindowTheme( hWnd );
|
||||
CloseThemeData( theme );
|
||||
OpenThemeData( hWnd, WC_BUTTONW );
|
||||
InvalidateRect( hWnd, NULL, TRUE );
|
||||
break;
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
|
|
|
@ -1698,6 +1698,7 @@ static LRESULT CALLBACK COMBO_WindowProc( HWND hwnd, UINT message, WPARAM wParam
|
|||
theme = GetWindowTheme( hwnd );
|
||||
CloseThemeData( theme );
|
||||
OpenThemeData( hwnd, WC_COMBOBOXW );
|
||||
InvalidateRect( hwnd, NULL, TRUE );
|
||||
break;
|
||||
|
||||
case WM_PRINTCLIENT:
|
||||
|
|
|
@ -1544,6 +1544,7 @@ static LRESULT DATETIME_ThemeChanged (DATETIME_INFO *infoPtr)
|
|||
theme = GetWindowTheme(infoPtr->hwndSelf);
|
||||
CloseThemeData(theme);
|
||||
OpenThemeData(infoPtr->hwndSelf, themeClass);
|
||||
InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -5097,6 +5097,7 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
|
|||
case WM_THEMECHANGED:
|
||||
CloseThemeData(GetWindowTheme(hwnd));
|
||||
OpenThemeData(hwnd, WC_EDITW);
|
||||
InvalidateRect(hwnd, NULL, TRUE);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -2110,7 +2110,7 @@ static LRESULT HEADER_ThemeChanged(const HEADER_INFO *infoPtr)
|
|||
HTHEME theme = GetWindowTheme(infoPtr->hwndSelf);
|
||||
CloseThemeData(theme);
|
||||
OpenThemeData(infoPtr->hwndSelf, themeClass);
|
||||
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
||||
InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -462,6 +462,7 @@ static LRESULT IPADDRESS_ThemeChanged (const IPADDRESS_INFO *infoPtr)
|
|||
HTHEME theme = GetWindowTheme (infoPtr->Self);
|
||||
CloseThemeData (theme);
|
||||
theme = OpenThemeData (theme, WC_EDITW);
|
||||
InvalidateRect (infoPtr->Self, NULL, TRUE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -3136,6 +3136,7 @@ static LRESULT CALLBACK LISTBOX_WindowProc( HWND hwnd, UINT msg, WPARAM wParam,
|
|||
theme = GetWindowTheme( hwnd );
|
||||
CloseThemeData( theme );
|
||||
OpenThemeData( hwnd, WC_LISTBOXW );
|
||||
InvalidateRect( hwnd, NULL, TRUE );
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -9345,6 +9345,7 @@ static LRESULT LISTVIEW_ThemeChanged(const LISTVIEW_INFO *infoPtr)
|
|||
HTHEME theme = GetWindowTheme(infoPtr->hwndSelf);
|
||||
CloseThemeData(theme);
|
||||
OpenThemeData(infoPtr->hwndSelf, themeClass);
|
||||
InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2697,6 +2697,7 @@ static LRESULT theme_changed (const MONTHCAL_INFO* infoPtr)
|
|||
HTHEME theme = GetWindowTheme (infoPtr->hwndSelf);
|
||||
CloseThemeData (theme);
|
||||
OpenThemeData (infoPtr->hwndSelf, themeClass);
|
||||
InvalidateRect (infoPtr->hwndSelf, NULL, TRUE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -966,6 +966,12 @@ PAGER_Timer (PAGER_INFO* infoPtr, INT nTimerId)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT PAGER_ThemeChanged (const PAGER_INFO* infoPtr)
|
||||
{
|
||||
InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
PAGER_EraseBackground (const PAGER_INFO* infoPtr, HDC hdc)
|
||||
{
|
||||
|
@ -1553,6 +1559,9 @@ PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
case WM_COMMAND:
|
||||
return SendMessageW (infoPtr->hwndNotify, uMsg, wParam, lParam);
|
||||
|
||||
case WM_THEMECHANGED:
|
||||
return PAGER_ThemeChanged (infoPtr);
|
||||
|
||||
default:
|
||||
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
|
|
@ -615,7 +615,7 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message,
|
|||
dwExStyle |= WS_EX_STATICEDGE;
|
||||
SetWindowLongW (hwnd, GWL_EXSTYLE, dwExStyle);
|
||||
|
||||
InvalidateRect (hwnd, NULL, FALSE);
|
||||
InvalidateRect (hwnd, NULL, TRUE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -505,6 +505,10 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
|
|||
STATIC_TryPaintFcn( hwnd, full_style );
|
||||
break;
|
||||
|
||||
case WM_THEMECHANGED:
|
||||
InvalidateRect( hwnd, 0, TRUE );
|
||||
break;
|
||||
|
||||
case WM_NCCREATE:
|
||||
{
|
||||
CREATESTRUCTW *cs = (CREATESTRUCTW *)lParam;
|
||||
|
|
|
@ -1111,6 +1111,7 @@ static LRESULT theme_changed (const STATUS_INFO* infoPtr)
|
|||
HTHEME theme = GetWindowTheme (infoPtr->Self);
|
||||
CloseThemeData (theme);
|
||||
OpenThemeData (infoPtr->Self, themeClass);
|
||||
InvalidateRect (infoPtr->Self, NULL, TRUE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -3106,6 +3106,7 @@ static LRESULT theme_changed(const TAB_INFO *infoPtr)
|
|||
HTHEME theme = GetWindowTheme (infoPtr->hwnd);
|
||||
CloseThemeData (theme);
|
||||
OpenThemeData (infoPtr->hwnd, themeClass);
|
||||
InvalidateRect (infoPtr->hwnd, NULL, TRUE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -556,30 +556,30 @@ static void test_WM_THEMECHANGED(void)
|
|||
static const struct wm_themechanged_test tests[] =
|
||||
{
|
||||
{ANIMATE_CLASSA, wm_themechanged_no_paint_seq},
|
||||
{WC_BUTTONA, wm_themechanged_paint_erase_seq, 2, {WM_GETTEXT, WM_GETTEXTLENGTH}, TRUE},
|
||||
{WC_COMBOBOXA, wm_themechanged_paint_erase_seq, 1, {WM_CTLCOLOREDIT}, TRUE},
|
||||
{WC_BUTTONA, wm_themechanged_paint_erase_seq, 2, {WM_GETTEXT, WM_GETTEXTLENGTH}},
|
||||
{WC_COMBOBOXA, wm_themechanged_paint_erase_seq, 1, {WM_CTLCOLOREDIT}},
|
||||
{WC_COMBOBOXEXA, wm_themechanged_no_paint_seq},
|
||||
{DATETIMEPICK_CLASSA, wm_themechanged_paint_erase_seq, 0, {0}, TRUE},
|
||||
{WC_EDITA, wm_themechanged_paint_erase_seq, 7, {WM_GETTEXTLENGTH, WM_GETFONT, EM_GETSEL, EM_GETRECT, EM_CHARFROMPOS, EM_LINEFROMCHAR, EM_POSFROMCHAR}, TRUE},
|
||||
{WC_HEADERA, wm_themechanged_paint_erase_seq, 0, {0}, TRUE},
|
||||
{DATETIMEPICK_CLASSA, wm_themechanged_paint_erase_seq},
|
||||
{WC_EDITA, wm_themechanged_paint_erase_seq, 7, {WM_GETTEXTLENGTH, WM_GETFONT, EM_GETSEL, EM_GETRECT, EM_CHARFROMPOS, EM_LINEFROMCHAR, EM_POSFROMCHAR}},
|
||||
{WC_HEADERA, wm_themechanged_paint_erase_seq},
|
||||
{HOTKEY_CLASSA, wm_themechanged_no_paint_seq},
|
||||
{WC_IPADDRESSA, wm_themechanged_paint_erase_seq, 1, {WM_CTLCOLOREDIT}, TRUE},
|
||||
{WC_LISTBOXA, wm_themechanged_paint_erase_seq, 0, {0}, TRUE},
|
||||
{WC_LISTVIEWA, wm_themechanged_paint_erase_seq, 0, {0}, TRUE},
|
||||
{MONTHCAL_CLASSA, wm_themechanged_paint_erase_seq, 0, {0}, TRUE},
|
||||
{WC_IPADDRESSA, wm_themechanged_paint_erase_seq, 1, {WM_CTLCOLOREDIT}},
|
||||
{WC_LISTBOXA, wm_themechanged_paint_erase_seq},
|
||||
{WC_LISTVIEWA, wm_themechanged_paint_erase_seq},
|
||||
{MONTHCAL_CLASSA, wm_themechanged_paint_erase_seq},
|
||||
{WC_NATIVEFONTCTLA, wm_themechanged_no_paint_seq},
|
||||
{WC_PAGESCROLLERA, wm_themechanged_paint_erase_seq, 0, {0}, TRUE},
|
||||
{PROGRESS_CLASSA, wm_themechanged_paint_erase_seq, 3, {WM_STYLECHANGING, WM_STYLECHANGED, WM_NCPAINT}, TRUE},
|
||||
{WC_PAGESCROLLERA, wm_themechanged_paint_erase_seq},
|
||||
{PROGRESS_CLASSA, wm_themechanged_paint_erase_seq, 3, {WM_STYLECHANGING, WM_STYLECHANGED, WM_NCPAINT}},
|
||||
{REBARCLASSNAMEA, wm_themechanged_no_paint_seq, 1, {WM_WINDOWPOSCHANGING}},
|
||||
{WC_STATICA, wm_themechanged_paint_erase_seq, 2, {WM_GETTEXT, WM_GETTEXTLENGTH}, TRUE},
|
||||
{STATUSCLASSNAMEA, wm_themechanged_paint_erase_seq, 0, {0}, TRUE},
|
||||
{WC_STATICA, wm_themechanged_paint_erase_seq, 2, {WM_GETTEXT, WM_GETTEXTLENGTH}},
|
||||
{STATUSCLASSNAMEA, wm_themechanged_paint_erase_seq},
|
||||
{"SysLink", wm_themechanged_no_paint_seq},
|
||||
{WC_TABCONTROLA, wm_themechanged_paint_erase_seq, 0, {0}, TRUE},
|
||||
{TOOLBARCLASSNAMEA, wm_themechanged_paint_erase_seq, 1, {WM_WINDOWPOSCHANGING}, TRUE},
|
||||
{WC_TABCONTROLA, wm_themechanged_paint_erase_seq},
|
||||
{TOOLBARCLASSNAMEA, wm_themechanged_paint_erase_seq, 1, {WM_WINDOWPOSCHANGING}},
|
||||
{TOOLTIPS_CLASSA, wm_themechanged_no_paint_seq},
|
||||
{TRACKBAR_CLASSA, wm_themechanged_paint_seq, 0, {0}, TRUE},
|
||||
{WC_TREEVIEWA, wm_themechanged_paint_erase_seq, 1, {0x1128}, TRUE},
|
||||
{UPDOWN_CLASSA, wm_themechanged_paint_erase_seq, 0, {0}, TRUE},
|
||||
{TRACKBAR_CLASSA, wm_themechanged_paint_seq},
|
||||
{WC_TREEVIEWA, wm_themechanged_paint_erase_seq, 1, {0x1128}},
|
||||
{UPDOWN_CLASSA, wm_themechanged_paint_erase_seq},
|
||||
{WC_SCROLLBARA, wm_themechanged_paint_erase_seq, 1, {SBM_GETSCROLLINFO}, TRUE},
|
||||
};
|
||||
|
||||
|
|
|
@ -547,6 +547,7 @@ LRESULT CALLBACK THEMING_ScrollbarSubclassProc (HWND hwnd, UINT msg,
|
|||
theme = GetWindowTheme(hwnd);
|
||||
CloseThemeData(theme);
|
||||
OpenThemeData(hwnd, themeClass);
|
||||
InvalidateRect(hwnd, NULL, TRUE);
|
||||
break;
|
||||
|
||||
case WM_SYSCOLORCHANGE:
|
||||
|
|
|
@ -6556,6 +6556,7 @@ static LRESULT theme_changed (HWND hwnd)
|
|||
HTHEME theme = GetWindowTheme (hwnd);
|
||||
CloseThemeData (theme);
|
||||
OpenThemeData (hwnd, themeClass);
|
||||
InvalidateRect (hwnd, NULL, TRUE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1720,6 +1720,7 @@ static LRESULT theme_changed (const TRACKBAR_INFO* infoPtr)
|
|||
HTHEME theme = GetWindowTheme (infoPtr->hwndSelf);
|
||||
CloseThemeData (theme);
|
||||
OpenThemeData (infoPtr->hwndSelf, themeClass);
|
||||
InvalidateRect (infoPtr->hwndSelf, NULL, FALSE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -5633,6 +5633,7 @@ static LRESULT TREEVIEW_ThemeChanged(const TREEVIEW_INFO *infoPtr)
|
|||
HTHEME theme = GetWindowTheme (infoPtr->hwnd);
|
||||
CloseThemeData (theme);
|
||||
OpenThemeData (infoPtr->hwnd, themeClass);
|
||||
InvalidateRect (infoPtr->hwnd, NULL, TRUE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -966,7 +966,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
|
|||
theme = GetWindowTheme (hwnd);
|
||||
CloseThemeData (theme);
|
||||
OpenThemeData (hwnd, L"Spin");
|
||||
InvalidateRect (hwnd, NULL, FALSE);
|
||||
InvalidateRect (hwnd, NULL, TRUE);
|
||||
break;
|
||||
|
||||
case WM_TIMER:
|
||||
|
|
Loading…
Reference in New Issue