-- v2: comctl32/datetime: Remove theming for comctl32 v5. comctl32/datetime: Add a helper to draw the background. comctl32: Add a helper to handle WM_NCPAINT messages. comctl32: Add a helper to handle WM_THEMECHANGED. comctl32: Add a helper to close the theme for a window. comctl32: Add a helper to open theme for a window. comctl32: Move uxtheme headers to comctl32.h.
From: Zhiyi Zhang zzhang@codeweavers.com
--- dlls/comctl32/comctl32.h | 3 +++ dlls/comctl32/datetime.c | 2 -- dlls/comctl32/header.c | 2 -- dlls/comctl32/hotkey.c | 1 - dlls/comctl32/ipaddress.c | 3 --- dlls/comctl32/listview.c | 2 -- dlls/comctl32/monthcal.c | 2 -- dlls/comctl32/progress.c | 2 -- dlls/comctl32/propsheet.c | 1 - dlls/comctl32/rebar.c | 2 -- dlls/comctl32/status.c | 2 -- dlls/comctl32/tab.c | 2 -- dlls/comctl32/toolbar.c | 2 -- dlls/comctl32/trackbar.c | 2 -- dlls/comctl32/treeview.c | 2 -- dlls/comctl32/updown.c | 2 -- dlls/comctl32_v6/button.c | 2 -- dlls/comctl32_v6/combo.c | 2 -- dlls/comctl32_v6/edit.c | 2 -- dlls/comctl32_v6/listbox.c | 2 -- dlls/comctl32_v6/static.c | 1 - 21 files changed, 3 insertions(+), 38 deletions(-)
diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h index 8d74464e67b..32e7658e22b 100644 --- a/dlls/comctl32/comctl32.h +++ b/dlls/comctl32/comctl32.h @@ -34,6 +34,9 @@ #include "winuser.h" #include "winnls.h" #include "commctrl.h" +#include "uxtheme.h" +#include "vsstyle.h" +#include "vssym32.h"
extern HMODULE COMCTL32_hModule; extern HBRUSH COMCTL32_hPattern55AABrush; diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 2772cfec00c..6f42c7e4c3d 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -43,8 +43,6 @@ #include "winnls.h" #include "commctrl.h" #include "comctl32.h" -#include "uxtheme.h" -#include "vsstyle.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(datetime); diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c index 354ca615500..fd31b98eee3 100644 --- a/dlls/comctl32/header.c +++ b/dlls/comctl32/header.c @@ -38,8 +38,6 @@ #include "winnls.h" #include "commctrl.h" #include "comctl32.h" -#include "vssym32.h" -#include "uxtheme.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(header); diff --git a/dlls/comctl32/hotkey.c b/dlls/comctl32/hotkey.c index a3a8a8ce6b4..17e2b282cd6 100644 --- a/dlls/comctl32/hotkey.c +++ b/dlls/comctl32/hotkey.c @@ -38,7 +38,6 @@ #include "winnls.h" #include "commctrl.h" #include "comctl32.h" -#include "uxtheme.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(hotkey); diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c index af1ae11300e..75918e00c70 100644 --- a/dlls/comctl32/ipaddress.c +++ b/dlls/comctl32/ipaddress.c @@ -35,9 +35,6 @@ #include "winnls.h" #include "commctrl.h" #include "comctl32.h" -#include "uxtheme.h" -#include "vsstyle.h" -#include "vssym32.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ipaddress); diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 7f51838f000..c0fc8d2103c 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -138,8 +138,6 @@ #include "winnls.h" #include "commctrl.h" #include "comctl32.h" -#include "uxtheme.h" -#include "vsstyle.h" #include "shlwapi.h"
#include "wine/debug.h" diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index ac8a382310e..ccbb57107d3 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -43,8 +43,6 @@ #include "winnls.h" #include "commctrl.h" #include "comctl32.h" -#include "uxtheme.h" -#include "vssym32.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(monthcal); diff --git a/dlls/comctl32/progress.c b/dlls/comctl32/progress.c index 9c4a0c3e3a0..b235abdc6a2 100644 --- a/dlls/comctl32/progress.c +++ b/dlls/comctl32/progress.c @@ -35,8 +35,6 @@ #include "winnls.h" #include "commctrl.h" #include "comctl32.h" -#include "uxtheme.h" -#include "vssym32.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(progress); diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 96a35338648..da15385f496 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -59,7 +59,6 @@ #include "commctrl.h" #include "prsht.h" #include "comctl32.h" -#include "uxtheme.h"
#include "wine/debug.h"
diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index 2ce19eb4f19..79c217c67a1 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -89,8 +89,6 @@ #include "winnls.h" #include "commctrl.h" #include "comctl32.h" -#include "uxtheme.h" -#include "vssym32.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(rebar); diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index 3473cf8f05a..bd5fa040ecf 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -41,8 +41,6 @@ #include "winnls.h" #include "commctrl.h" #include "comctl32.h" -#include "uxtheme.h" -#include "vssym32.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(statusbar); diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index 887682196bc..535fac11120 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -63,8 +63,6 @@ #include "winnls.h" #include "commctrl.h" #include "comctl32.h" -#include "uxtheme.h" -#include "vssym32.h" #include "wine/debug.h" #include <math.h>
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 05dcdd7e37b..0a660a85fc8 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -79,8 +79,6 @@ #include "winnls.h" #include "commctrl.h" #include "comctl32.h" -#include "uxtheme.h" -#include "vssym32.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(toolbar); diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c index 2cc1f747e1f..978fb283b7a 100644 --- a/dlls/comctl32/trackbar.c +++ b/dlls/comctl32/trackbar.c @@ -32,8 +32,6 @@ #include "winuser.h" #include "winnls.h" #include "commctrl.h" -#include "uxtheme.h" -#include "vssym32.h" #include "wine/debug.h"
#include "comctl32.h" diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index e353fda34af..fb06a727748 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -54,8 +54,6 @@ #include "winnls.h" #include "commctrl.h" #include "comctl32.h" -#include "uxtheme.h" -#include "vssym32.h" #include "wine/debug.h" #include "wine/exception.h"
diff --git a/dlls/comctl32/updown.c b/dlls/comctl32/updown.c index 284e3d91c9a..519aa9dde2a 100644 --- a/dlls/comctl32/updown.c +++ b/dlls/comctl32/updown.c @@ -31,8 +31,6 @@ #include "winnls.h" #include "commctrl.h" #include "comctl32.h" -#include "uxtheme.h" -#include "vssym32.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(updown); diff --git a/dlls/comctl32_v6/button.c b/dlls/comctl32_v6/button.c index a0eb41fec20..1ad752fc861 100644 --- a/dlls/comctl32_v6/button.c +++ b/dlls/comctl32_v6/button.c @@ -51,8 +51,6 @@ #include "winbase.h" #include "wingdi.h" #include "winuser.h" -#include "uxtheme.h" -#include "vssym32.h" #include "wine/debug.h"
#include "comctl32.h" diff --git a/dlls/comctl32_v6/combo.c b/dlls/comctl32_v6/combo.c index b85066b6f6d..607e18a6f18 100644 --- a/dlls/comctl32_v6/combo.c +++ b/dlls/comctl32_v6/combo.c @@ -29,8 +29,6 @@ #include "winbase.h" #include "wingdi.h" #include "winuser.h" -#include "uxtheme.h" -#include "vssym32.h" #include "commctrl.h" #include "wine/debug.h"
diff --git a/dlls/comctl32_v6/edit.c b/dlls/comctl32_v6/edit.c index b8f995057f4..16a05d59101 100644 --- a/dlls/comctl32_v6/edit.c +++ b/dlls/comctl32_v6/edit.c @@ -42,8 +42,6 @@ #include "imm.h" #include "usp10.h" #include "commctrl.h" -#include "uxtheme.h" -#include "vsstyle.h" #include "comctl32.h" #include "wine/debug.h"
diff --git a/dlls/comctl32_v6/listbox.c b/dlls/comctl32_v6/listbox.c index c770c2470ed..01b14f36079 100644 --- a/dlls/comctl32_v6/listbox.c +++ b/dlls/comctl32_v6/listbox.c @@ -29,8 +29,6 @@ #include "wingdi.h" #include "winuser.h" #include "commctrl.h" -#include "uxtheme.h" -#include "vssym32.h" #include "wine/exception.h" #include "wine/debug.h"
diff --git a/dlls/comctl32_v6/static.c b/dlls/comctl32_v6/static.c index 605b75612e8..b1ec0e6b008 100644 --- a/dlls/comctl32_v6/static.c +++ b/dlls/comctl32_v6/static.c @@ -36,7 +36,6 @@ #include "wingdi.h" #include "winuser.h" #include "commctrl.h" -#include "uxtheme.h"
#include "wine/debug.h"
From: Zhiyi Zhang zzhang@codeweavers.com
--- dlls/comctl32/comctl32.h | 1 + dlls/comctl32/commctrl.c | 5 +++++ dlls/comctl32_v6/button.c | 4 ++-- dlls/comctl32_v6/combo.c | 4 ++-- dlls/comctl32_v6/edit.c | 4 ++-- dlls/comctl32_v6/listbox.c | 4 ++-- 6 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h index 32e7658e22b..826f854640e 100644 --- a/dlls/comctl32/comctl32.h +++ b/dlls/comctl32/comctl32.h @@ -189,6 +189,7 @@ extern COMCTL32_SysColor comctl32_color; /* Internal function */ HWND COMCTL32_CreateToolTip(HWND); void COMCTL32_DrawStatusText(HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style, BOOL draw_background); +void COMCTL32_OpenThemeForWindow(HWND hwnd, const WCHAR *theme_class); VOID COMCTL32_RefreshSysColors(void); void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark, BOOL bHorizontal); void COMCTL32_EnsureBitmapSize(HBITMAP *pBitmap, int cxMinWidth, int cyMinHeight, COLORREF crBackground); diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index 4cb46fa7311..3a364ac8aba 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -3105,6 +3105,11 @@ LRESULT COMCTL32_forward_notify_to_ansi_window(HWND hwnd_notify, NMHDR *hdr, WCH return SendMessageW(hwnd_notify, WM_NOTIFY, hdr->idFrom, (LPARAM)hdr); }
+void COMCTL32_OpenThemeForWindow(HWND hwnd, const WCHAR *theme_class) +{ + OpenThemeData(hwnd, theme_class); +} + /* A helper to handle CCM_SETVERSION messages */ LRESULT COMCTL32_SetVersion(INT *current_version, INT new_version) { diff --git a/dlls/comctl32_v6/button.c b/dlls/comctl32_v6/button.c index 1ad752fc861..b806fc1d0c2 100644 --- a/dlls/comctl32_v6/button.c +++ b/dlls/comctl32_v6/button.c @@ -536,7 +536,7 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L SetWindowLongW( hWnd, GWL_STYLE, style ); } infoPtr->state = BST_UNCHECKED; - OpenThemeData( hWnd, WC_BUTTONW ); + COMCTL32_OpenThemeForWindow( hWnd, WC_BUTTONW );
parent = GetParent( hWnd ); if (parent) @@ -552,7 +552,7 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L case WM_THEMECHANGED: theme = GetWindowTheme( hWnd ); CloseThemeData( theme ); - OpenThemeData( hWnd, WC_BUTTONW ); + COMCTL32_OpenThemeForWindow( hWnd, WC_BUTTONW ); InvalidateRect( hWnd, NULL, TRUE ); break;
diff --git a/dlls/comctl32_v6/combo.c b/dlls/comctl32_v6/combo.c index 607e18a6f18..b8e0668525f 100644 --- a/dlls/comctl32_v6/combo.c +++ b/dlls/comctl32_v6/combo.c @@ -397,7 +397,7 @@ static void CBGetDroppedControlRect( LPHEADCOMBO lphc, LPRECT lpRect) */ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG style ) { - OpenThemeData( hwnd, WC_COMBOBOXW ); + COMCTL32_OpenThemeForWindow( hwnd, WC_COMBOBOXW ); if( !CB_GETTYPE(lphc) ) lphc->dwStyle |= CBS_SIMPLE; if( CB_GETTYPE(lphc) != CBS_DROPDOWNLIST ) lphc->wState |= CBF_EDIT;
@@ -1696,7 +1696,7 @@ static LRESULT CALLBACK COMBO_WindowProc( HWND hwnd, UINT message, WPARAM wParam case WM_THEMECHANGED: theme = GetWindowTheme( hwnd ); CloseThemeData( theme ); - OpenThemeData( hwnd, WC_COMBOBOXW ); + COMCTL32_OpenThemeForWindow( hwnd, WC_COMBOBOXW ); InvalidateRect( hwnd, NULL, TRUE ); break;
diff --git a/dlls/comctl32_v6/edit.c b/dlls/comctl32_v6/edit.c index 16a05d59101..f34fecaa1cf 100644 --- a/dlls/comctl32_v6/edit.c +++ b/dlls/comctl32_v6/edit.c @@ -4443,7 +4443,7 @@ static LRESULT EDIT_WM_Create(EDITSTATE *es, const WCHAR *name)
/* force scroll info update */ EDIT_UpdateScrollInfo(es); - OpenThemeData(es->hwndSelf, WC_EDITW); + COMCTL32_OpenThemeForWindow(es->hwndSelf, WC_EDITW);
/* The rule seems to return 1 here for success */ /* Power Builder masked edit controls will crash */ @@ -4994,7 +4994,7 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
case WM_THEMECHANGED: CloseThemeData(GetWindowTheme(hwnd)); - OpenThemeData(hwnd, WC_EDITW); + COMCTL32_OpenThemeForWindow(hwnd, WC_EDITW); InvalidateRect(hwnd, NULL, TRUE); break;
diff --git a/dlls/comctl32_v6/listbox.c b/dlls/comctl32_v6/listbox.c index 01b14f36079..51da1c1daec 100644 --- a/dlls/comctl32_v6/listbox.c +++ b/dlls/comctl32_v6/listbox.c @@ -2653,7 +2653,7 @@ static BOOL LISTBOX_Create( HWND hwnd, LPHEADCOMBO lphc ) } }
- OpenThemeData( descr->self, WC_LISTBOXW ); + COMCTL32_OpenThemeForWindow( descr->self, WC_LISTBOXW );
TRACE("owner: %p, style: %08x, width: %d, height: %d\n", descr->owner, descr->style, descr->width, descr->height); return TRUE; @@ -3160,7 +3160,7 @@ static LRESULT CALLBACK LISTBOX_WindowProc( HWND hwnd, UINT msg, WPARAM wParam, case WM_THEMECHANGED: theme = GetWindowTheme( hwnd ); CloseThemeData( theme ); - OpenThemeData( hwnd, WC_LISTBOXW ); + COMCTL32_OpenThemeForWindow( hwnd, WC_LISTBOXW ); InvalidateRect( hwnd, NULL, TRUE ); break;
From: Zhiyi Zhang zzhang@codeweavers.com
--- dlls/comctl32/comctl32.h | 1 + dlls/comctl32/commctrl.c | 5 +++++ dlls/comctl32_v6/button.c | 6 ++---- dlls/comctl32_v6/combo.c | 7 ++----- dlls/comctl32_v6/edit.c | 4 +--- dlls/comctl32_v6/listbox.c | 7 ++----- 6 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h index 826f854640e..48ec4c1c149 100644 --- a/dlls/comctl32/comctl32.h +++ b/dlls/comctl32/comctl32.h @@ -187,6 +187,7 @@ typedef struct extern COMCTL32_SysColor comctl32_color;
/* Internal function */ +void COMCTL32_CloseThemeForWindow(HWND hwnd); HWND COMCTL32_CreateToolTip(HWND); void COMCTL32_DrawStatusText(HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style, BOOL draw_background); void COMCTL32_OpenThemeForWindow(HWND hwnd, const WCHAR *theme_class); diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index 3a364ac8aba..d74ff7d1fd8 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -3110,6 +3110,11 @@ void COMCTL32_OpenThemeForWindow(HWND hwnd, const WCHAR *theme_class) OpenThemeData(hwnd, theme_class); }
+void COMCTL32_CloseThemeForWindow(HWND hwnd) +{ + CloseThemeData(GetWindowTheme(hwnd)); +} + /* A helper to handle CCM_SETVERSION messages */ LRESULT COMCTL32_SetVersion(INT *current_version, INT new_version) { diff --git a/dlls/comctl32_v6/button.c b/dlls/comctl32_v6/button.c index b806fc1d0c2..5667cb31bd6 100644 --- a/dlls/comctl32_v6/button.c +++ b/dlls/comctl32_v6/button.c @@ -545,13 +545,11 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L }
case WM_DESTROY: - theme = GetWindowTheme( hWnd ); - CloseThemeData( theme ); + COMCTL32_CloseThemeForWindow( hWnd ); break;
case WM_THEMECHANGED: - theme = GetWindowTheme( hWnd ); - CloseThemeData( theme ); + COMCTL32_CloseThemeForWindow( hWnd ); COMCTL32_OpenThemeForWindow( hWnd, WC_BUTTONW ); InvalidateRect( hWnd, NULL, TRUE ); break; diff --git a/dlls/comctl32_v6/combo.c b/dlls/comctl32_v6/combo.c index b8e0668525f..7eb6383f831 100644 --- a/dlls/comctl32_v6/combo.c +++ b/dlls/comctl32_v6/combo.c @@ -1659,7 +1659,6 @@ static LRESULT COMBO_GetComboBoxInfo(const HEADCOMBO *lphc, COMBOBOXINFO *pcbi) static LRESULT CALLBACK COMBO_WindowProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) { HEADCOMBO *lphc = (HEADCOMBO *)GetWindowLongPtrW( hwnd, 0 ); - HTHEME theme;
TRACE("[%p]: msg %#x, wp %Ix, lp %Ix\n", hwnd, message, wParam, lParam );
@@ -1689,13 +1688,11 @@ static LRESULT CALLBACK COMBO_WindowProc( HWND hwnd, UINT message, WPARAM wParam }
case WM_DESTROY: - theme = GetWindowTheme( hwnd ); - CloseThemeData( theme ); + COMCTL32_CloseThemeForWindow( hwnd ); break;
case WM_THEMECHANGED: - theme = GetWindowTheme( hwnd ); - CloseThemeData( theme ); + COMCTL32_CloseThemeForWindow( hwnd ); COMCTL32_OpenThemeForWindow( hwnd, WC_COMBOBOXW ); InvalidateRect( hwnd, NULL, TRUE ); break; diff --git a/dlls/comctl32_v6/edit.c b/dlls/comctl32_v6/edit.c index f34fecaa1cf..8cfa6f7c7ef 100644 --- a/dlls/comctl32_v6/edit.c +++ b/dlls/comctl32_v6/edit.c @@ -4461,10 +4461,8 @@ static LRESULT EDIT_WM_Create(EDITSTATE *es, const WCHAR *name) static LRESULT EDIT_WM_NCDestroy(EDITSTATE *es) { LINEDEF *pc, *pp; - HTHEME theme;
- theme = GetWindowTheme(es->hwndSelf); - CloseThemeData(theme); + COMCTL32_CloseThemeForWindow(es->hwndSelf);
/* The app can own the text buffer handle */ if (es->hloc32W && (es->hloc32W != es->hlocapp)) diff --git a/dlls/comctl32_v6/listbox.c b/dlls/comctl32_v6/listbox.c index 51da1c1daec..543b506d3c2 100644 --- a/dlls/comctl32_v6/listbox.c +++ b/dlls/comctl32_v6/listbox.c @@ -2665,8 +2665,7 @@ static BOOL LISTBOX_Create( HWND hwnd, LPHEADCOMBO lphc ) */ static BOOL LISTBOX_Destroy( LB_DESCR *descr ) { - HTHEME theme = GetWindowTheme( descr->self ); - CloseThemeData( theme ); + COMCTL32_CloseThemeForWindow( descr->self ); LISTBOX_ResetContent( descr ); SetWindowLongPtrW( descr->self, 0, 0 ); HeapFree( GetProcessHeap(), 0, descr ); @@ -2681,7 +2680,6 @@ static LRESULT CALLBACK LISTBOX_WindowProc( HWND hwnd, UINT msg, WPARAM wParam, { LB_DESCR *descr = (LB_DESCR *)GetWindowLongPtrW( hwnd, 0 ); HEADCOMBO *lphc = NULL; - HTHEME theme; LRESULT ret;
if (!descr) @@ -3158,8 +3156,7 @@ static LRESULT CALLBACK LISTBOX_WindowProc( HWND hwnd, UINT msg, WPARAM wParam, break;
case WM_THEMECHANGED: - theme = GetWindowTheme( hwnd ); - CloseThemeData( theme ); + COMCTL32_CloseThemeForWindow( hwnd ); COMCTL32_OpenThemeForWindow( hwnd, WC_LISTBOXW ); InvalidateRect( hwnd, NULL, TRUE ); break;
From: Zhiyi Zhang zzhang@codeweavers.com
--- dlls/comctl32/comctl32.h | 1 + dlls/comctl32/commctrl.c | 14 ++++++++++++++ dlls/comctl32_v6/button.c | 5 +---- dlls/comctl32_v6/combo.c | 5 +---- dlls/comctl32_v6/edit.c | 5 +---- dlls/comctl32_v6/listbox.c | 5 +---- dlls/comctl32_v6/static.c | 3 +-- 7 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h index 48ec4c1c149..adf3de64738 100644 --- a/dlls/comctl32/comctl32.h +++ b/dlls/comctl32/comctl32.h @@ -197,6 +197,7 @@ void COMCTL32_EnsureBitmapSize(HBITMAP *pBitmap, int cxMinWidth, int cyMinHeight void COMCTL32_GetFontMetrics(HFONT hFont, TEXTMETRICW *ptm); BOOL COMCTL32_IsReflectedMessage(UINT uMsg); LRESULT COMCTL32_SetVersion(INT *current_version, INT new_version); +LRESULT COMCTL32_ThemeChanged(HWND hwnd, const WCHAR *theme_class, BOOL invalidate, BOOL erase); INT Str_GetPtrWtoA(LPCWSTR lpSrc, LPSTR lpDest, INT nMaxLen); INT Str_GetPtrAtoW(LPCSTR lpSrc, LPWSTR lpDest, INT nMaxLen); BOOL Str_SetPtrAtoW(LPWSTR *lppDest, LPCSTR lpSrc); diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index d74ff7d1fd8..3cc0d79c248 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -3131,3 +3131,17 @@ LRESULT COMCTL32_SetVersion(INT *current_version, INT new_version) return old_version; #endif } + +/* A helper to handle WM_THEMECHANGED messages */ +LRESULT COMCTL32_ThemeChanged(HWND hwnd, const WCHAR *theme_class, BOOL invalidate, BOOL erase) +{ + if (theme_class) + { + COMCTL32_CloseThemeForWindow(hwnd); + COMCTL32_OpenThemeForWindow(hwnd, theme_class); + } + + if (invalidate) + InvalidateRect(hwnd, NULL, erase); + return 0; +} diff --git a/dlls/comctl32_v6/button.c b/dlls/comctl32_v6/button.c index 5667cb31bd6..9128e523c20 100644 --- a/dlls/comctl32_v6/button.c +++ b/dlls/comctl32_v6/button.c @@ -549,10 +549,7 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L break;
case WM_THEMECHANGED: - COMCTL32_CloseThemeForWindow( hWnd ); - COMCTL32_OpenThemeForWindow( hWnd, WC_BUTTONW ); - InvalidateRect( hWnd, NULL, TRUE ); - break; + return COMCTL32_ThemeChanged( hWnd, WC_BUTTONW, TRUE, TRUE );
case WM_ERASEBKGND: if (btn_type == BS_OWNERDRAW) diff --git a/dlls/comctl32_v6/combo.c b/dlls/comctl32_v6/combo.c index 7eb6383f831..453f1de7dd9 100644 --- a/dlls/comctl32_v6/combo.c +++ b/dlls/comctl32_v6/combo.c @@ -1692,10 +1692,7 @@ static LRESULT CALLBACK COMBO_WindowProc( HWND hwnd, UINT message, WPARAM wParam break;
case WM_THEMECHANGED: - COMCTL32_CloseThemeForWindow( hwnd ); - COMCTL32_OpenThemeForWindow( hwnd, WC_COMBOBOXW ); - InvalidateRect( hwnd, NULL, TRUE ); - break; + return COMCTL32_ThemeChanged( hwnd, WC_COMBOBOXW, TRUE, TRUE );
case WM_PRINTCLIENT: case WM_PAINT: diff --git a/dlls/comctl32_v6/edit.c b/dlls/comctl32_v6/edit.c index 8cfa6f7c7ef..98a4a218e52 100644 --- a/dlls/comctl32_v6/edit.c +++ b/dlls/comctl32_v6/edit.c @@ -4991,10 +4991,7 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR break;
case WM_THEMECHANGED: - CloseThemeData(GetWindowTheme(hwnd)); - COMCTL32_OpenThemeForWindow(hwnd, WC_EDITW); - InvalidateRect(hwnd, NULL, TRUE); - break; + return COMCTL32_ThemeChanged(hwnd, WC_EDITW, TRUE, TRUE);
default: result = DefWindowProcW(hwnd, msg, wParam, lParam); diff --git a/dlls/comctl32_v6/listbox.c b/dlls/comctl32_v6/listbox.c index 543b506d3c2..9caa30239a9 100644 --- a/dlls/comctl32_v6/listbox.c +++ b/dlls/comctl32_v6/listbox.c @@ -3156,10 +3156,7 @@ static LRESULT CALLBACK LISTBOX_WindowProc( HWND hwnd, UINT msg, WPARAM wParam, break;
case WM_THEMECHANGED: - COMCTL32_CloseThemeForWindow( hwnd ); - COMCTL32_OpenThemeForWindow( hwnd, WC_LISTBOXW ); - InvalidateRect( hwnd, NULL, TRUE ); - break; + return COMCTL32_ThemeChanged( hwnd, WC_LISTBOXW, TRUE, TRUE );
default: if ((msg >= WM_USER) && (msg < 0xc000)) diff --git a/dlls/comctl32_v6/static.c b/dlls/comctl32_v6/static.c index b1ec0e6b008..c243d3f871e 100644 --- a/dlls/comctl32_v6/static.c +++ b/dlls/comctl32_v6/static.c @@ -527,8 +527,7 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, break;
case WM_THEMECHANGED: - InvalidateRect( hwnd, 0, TRUE ); - break; + return COMCTL32_ThemeChanged( hwnd, NULL, TRUE, TRUE );
case WM_NCCREATE: {
From: Zhiyi Zhang zzhang@codeweavers.com
--- dlls/comctl32/comctl32.h | 1 + dlls/comctl32/commctrl.c | 49 ++++++++++++++++++++++++++++++++++++++ dlls/comctl32_v6/listbox.c | 39 +----------------------------- 3 files changed, 51 insertions(+), 38 deletions(-)
diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h index adf3de64738..de4b2dac956 100644 --- a/dlls/comctl32/comctl32.h +++ b/dlls/comctl32/comctl32.h @@ -196,6 +196,7 @@ void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark void COMCTL32_EnsureBitmapSize(HBITMAP *pBitmap, int cxMinWidth, int cyMinHeight, COLORREF crBackground); void COMCTL32_GetFontMetrics(HFONT hFont, TEXTMETRICW *ptm); BOOL COMCTL32_IsReflectedMessage(UINT uMsg); +LRESULT COMCTL32_NCPaint(HWND hwnd, WPARAM wp, LPARAM lp, const WCHAR *theme_class); LRESULT COMCTL32_SetVersion(INT *current_version, INT new_version); LRESULT COMCTL32_ThemeChanged(HWND hwnd, const WCHAR *theme_class, BOOL invalidate, BOOL erase); INT Str_GetPtrWtoA(LPCWSTR lpSrc, LPSTR lpDest, INT nMaxLen); diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index 3cc0d79c248..c7541a91668 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -3145,3 +3145,52 @@ LRESULT COMCTL32_ThemeChanged(HWND hwnd, const WCHAR *theme_class, BOOL invalida InvalidateRect(hwnd, NULL, erase); return 0; } + +/* A helper to handle WM_NCPAINT messages + * + * If theme_class is specified, open the specified theme class. Otherwise, get the theme class from + * the window. + */ +LRESULT COMCTL32_NCPaint(HWND hwnd, WPARAM wp, LPARAM lp, const WCHAR *theme_class) +{ + HRGN region = (HRGN)wp, clipRgn; + INT cxEdge, cyEdge; + HTHEME theme; + LONG exStyle; + HDC dc; + RECT r; + + exStyle = GetWindowLongW(hwnd, GWL_EXSTYLE); + if (!(exStyle & WS_EX_CLIENTEDGE)) + return DefWindowProcW(hwnd, WM_NCPAINT, wp, lp); + + if (theme_class) + theme = OpenThemeDataForDpi(NULL, theme_class, GetDpiForWindow(hwnd)); + else + theme = GetWindowTheme(hwnd); + if (!theme) + return DefWindowProcW(hwnd, WM_NCPAINT, wp, lp); + + cxEdge = GetSystemMetrics(SM_CXEDGE); + cyEdge = GetSystemMetrics(SM_CYEDGE); + GetWindowRect(hwnd, &r); + + /* New clipping region passed to default proc to exclude border */ + clipRgn = CreateRectRgn(r.left + cxEdge, r.top + cyEdge, r.right - cxEdge, r.bottom - cyEdge); + if (region != (HRGN)1) + CombineRgn(clipRgn, clipRgn, region, RGN_AND); + OffsetRect(&r, -r.left, -r.top); + + dc = GetDCEx(hwnd, region, DCX_WINDOW | DCX_INTERSECTRGN); + if (IsThemeBackgroundPartiallyTransparent(theme, 0, 0)) + DrawThemeParentBackground(hwnd, dc, &r); + DrawThemeBackground(theme, dc, 0, 0, &r, 0); + ReleaseDC(hwnd, dc); + if (theme_class) + CloseThemeData(theme); + + /* Call default proc to get the scrollbars etc. also painted */ + DefWindowProcW(hwnd, WM_NCPAINT, (WPARAM)clipRgn, 0); + DeleteObject(clipRgn); + return 0; +} diff --git a/dlls/comctl32_v6/listbox.c b/dlls/comctl32_v6/listbox.c index 9caa30239a9..7dec0e2d999 100644 --- a/dlls/comctl32_v6/listbox.c +++ b/dlls/comctl32_v6/listbox.c @@ -1196,43 +1196,6 @@ static LRESULT LISTBOX_Paint( LB_DESCR *descr, HDC hdc ) return 0; }
-static LRESULT LISTBOX_NCPaint( LB_DESCR *descr, HRGN region ) -{ - DWORD exstyle = GetWindowLongW( descr->self, GWL_EXSTYLE); - HTHEME theme = GetWindowTheme( descr->self ); - HRGN cliprgn = region; - int cxEdge, cyEdge; - HDC hdc; - RECT r; - - if (!theme || !(exstyle & WS_EX_CLIENTEDGE)) - return DefWindowProcW(descr->self, WM_NCPAINT, (WPARAM)region, 0); - - cxEdge = GetSystemMetrics(SM_CXEDGE); - cyEdge = GetSystemMetrics(SM_CYEDGE); - - GetWindowRect(descr->self, &r); - - /* New clipping region passed to default proc to exclude border */ - cliprgn = CreateRectRgn(r.left + cxEdge, r.top + cyEdge, - r.right - cxEdge, r.bottom - cyEdge); - if (region != (HRGN)1) - CombineRgn(cliprgn, cliprgn, region, RGN_AND); - OffsetRect(&r, -r.left, -r.top); - - hdc = GetDCEx(descr->self, region, DCX_WINDOW|DCX_INTERSECTRGN); - - if (IsThemeBackgroundPartiallyTransparent (theme, 0, 0)) - DrawThemeParentBackground(descr->self, hdc, &r); - DrawThemeBackground (theme, hdc, 0, 0, &r, 0); - ReleaseDC(descr->self, hdc); - - /* Call default proc to get the scrollbars etc. also painted */ - DefWindowProcW(descr->self, WM_NCPAINT, (WPARAM)cliprgn, 0); - DeleteObject(cliprgn); - return 0; -} - /*********************************************************************** * LISTBOX_InvalidateItems * @@ -2998,7 +2961,7 @@ static LRESULT CALLBACK LISTBOX_WindowProc( HWND hwnd, UINT msg, WPARAM wParam, return ret;
case WM_NCPAINT: - return LISTBOX_NCPaint( descr, (HRGN)wParam ); + return COMCTL32_NCPaint( descr->self, wParam, lParam, NULL );
case WM_GETOBJECT: if ((LONG)lParam == OBJID_QUERYCLASSNAMEIDX)
From: Zhiyi Zhang zzhang@codeweavers.com
--- dlls/comctl32/datetime.c | 51 ++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 23 deletions(-)
diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 6f42c7e4c3d..74255c76b7f 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -705,12 +705,36 @@ static int DATETIME_GetFieldWidth (const DATETIME_INFO *infoPtr, HDC hdc, int co return size.cx; }
-static void -DATETIME_Refresh (DATETIME_INFO *infoPtr, HDC hdc) +static void DATETIME_DrawBackground (DATETIME_INFO *infoPtr, HDC hdc) { HTHEME theme; - int state;
+ theme = GetWindowTheme(infoPtr->hwndSelf); + if (theme) + { + int state; + + if (infoPtr->dwStyle & WS_DISABLED) + state = ABS_DOWNDISABLED; + else if (infoPtr->bCalDepressed) + state = ABS_DOWNPRESSED; + else if (infoPtr->bCalHot) + state = ABS_DOWNHOT; + else + state = ABS_DOWNNORMAL; + + DrawThemeBackground(theme, hdc, SBP_ARROWBTN, state, &infoPtr->calbutton, NULL); + return; + } + + DrawFrameControl(hdc, &infoPtr->calbutton, DFC_SCROLL, DFCS_SCROLLDOWN | + (infoPtr->bCalDepressed ? DFCS_PUSHED : 0) | + (infoPtr->dwStyle & WS_DISABLED ? DFCS_INACTIVE : 0)); +} + +static void +DATETIME_Refresh (DATETIME_INFO *infoPtr, HDC hdc) +{ TRACE("\n");
if (infoPtr->dateValid) { @@ -777,26 +801,7 @@ DATETIME_Refresh (DATETIME_INFO *infoPtr, HDC hdc) if (infoPtr->dwStyle & DTS_UPDOWN) return;
- theme = GetWindowTheme(infoPtr->hwndSelf); - if (theme) - { - if (infoPtr->dwStyle & WS_DISABLED) - state = ABS_DOWNDISABLED; - else if (infoPtr->bCalDepressed) - state = ABS_DOWNPRESSED; - else if (infoPtr->bCalHot) - state = ABS_DOWNHOT; - else - state = ABS_DOWNNORMAL; - - DrawThemeBackground(theme, hdc, SBP_ARROWBTN, state, &infoPtr->calbutton, NULL); - } - else - { - DrawFrameControl(hdc, &infoPtr->calbutton, DFC_SCROLL, - DFCS_SCROLLDOWN | (infoPtr->bCalDepressed ? DFCS_PUSHED : 0) | - (infoPtr->dwStyle & WS_DISABLED ? DFCS_INACTIVE : 0) ); - } + DATETIME_DrawBackground(infoPtr, hdc); }
From: Zhiyi Zhang zzhang@codeweavers.com
--- dlls/comctl32/commctrl.c | 12 +++++++ dlls/comctl32/datetime.c | 68 ++++------------------------------------ 2 files changed, 18 insertions(+), 62 deletions(-)
diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index c7541a91668..cf5f4b3256a 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -3107,12 +3107,16 @@ LRESULT COMCTL32_forward_notify_to_ansi_window(HWND hwnd_notify, NMHDR *hdr, WCH
void COMCTL32_OpenThemeForWindow(HWND hwnd, const WCHAR *theme_class) { +#if __WINE_COMCTL32_VERSION == 6 OpenThemeData(hwnd, theme_class); +#endif }
void COMCTL32_CloseThemeForWindow(HWND hwnd) { +#if __WINE_COMCTL32_VERSION == 6 CloseThemeData(GetWindowTheme(hwnd)); +#endif }
/* A helper to handle CCM_SETVERSION messages */ @@ -3135,6 +3139,7 @@ LRESULT COMCTL32_SetVersion(INT *current_version, INT new_version) /* A helper to handle WM_THEMECHANGED messages */ LRESULT COMCTL32_ThemeChanged(HWND hwnd, const WCHAR *theme_class, BOOL invalidate, BOOL erase) { +#if __WINE_COMCTL32_VERSION == 6 if (theme_class) { COMCTL32_CloseThemeForWindow(hwnd); @@ -3144,6 +3149,9 @@ LRESULT COMCTL32_ThemeChanged(HWND hwnd, const WCHAR *theme_class, BOOL invalida if (invalidate) InvalidateRect(hwnd, NULL, erase); return 0; +#else + return DefWindowProcW(hwnd, WM_THEMECHANGED, 0, 0); +#endif }
/* A helper to handle WM_NCPAINT messages @@ -3153,6 +3161,7 @@ LRESULT COMCTL32_ThemeChanged(HWND hwnd, const WCHAR *theme_class, BOOL invalida */ LRESULT COMCTL32_NCPaint(HWND hwnd, WPARAM wp, LPARAM lp, const WCHAR *theme_class) { +#if __WINE_COMCTL32_VERSION == 6 HRGN region = (HRGN)wp, clipRgn; INT cxEdge, cyEdge; HTHEME theme; @@ -3193,4 +3202,7 @@ LRESULT COMCTL32_NCPaint(HWND hwnd, WPARAM wp, LPARAM lp, const WCHAR *theme_cla DefWindowProcW(hwnd, WM_NCPAINT, (WPARAM)clipRgn, 0); DeleteObject(clipRgn); return 0; +#else + return DefWindowProcW(hwnd, WM_NCPAINT, wp, lp); +#endif } diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 74255c76b7f..f7498842008 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -125,7 +125,6 @@ static BOOL DATETIME_SendSimpleNotify (const DATETIME_INFO *infoPtr, UINT code); static BOOL DATETIME_SendDateTimeChangeNotify (const DATETIME_INFO *infoPtr); static const WCHAR allowedformatchars[] = L"dhHmMstyX"; static const int maxrepetition [] = {4,2,2,2,4,2,2,4,-1}; -static const WCHAR *themeClass = WC_SCROLLBARW;
/* valid date limits */ static const SYSTEMTIME max_allowed_date = { .wYear = 9999, .wMonth = 12, .wDayOfWeek = 0, .wDay = 31 }; @@ -707,6 +706,7 @@ static int DATETIME_GetFieldWidth (const DATETIME_INFO *infoPtr, HDC hdc, int co
static void DATETIME_DrawBackground (DATETIME_INFO *infoPtr, HDC hdc) { +#if __WINE_COMCTL32_VERSION == 6 HTHEME theme;
theme = GetWindowTheme(infoPtr->hwndSelf); @@ -726,6 +726,7 @@ static void DATETIME_DrawBackground (DATETIME_INFO *infoPtr, HDC hdc) DrawThemeBackground(theme, hdc, SBP_ARROWBTN, state, &infoPtr->calbutton, NULL); return; } +#endif /* __WINE_COMCTL32_VERSION == 6 */
DrawFrameControl(hdc, &infoPtr->calbutton, DFC_SCROLL, DFCS_SCROLLDOWN | (infoPtr->bCalDepressed ? DFCS_PUSHED : 0) | @@ -1307,49 +1308,6 @@ DATETIME_NCCreate (HWND hwnd, const CREATESTRUCTW *lpcs) return 1; }
-static LRESULT DATETIME_NCPaint (HWND hwnd, HRGN region) -{ - INT cxEdge, cyEdge; - HRGN clipRgn; - HTHEME theme; - LONG exStyle; - RECT r; - HDC dc; - - theme = OpenThemeDataForDpi(NULL, WC_EDITW, GetDpiForWindow(hwnd)); - if (!theme) - return DefWindowProcW(hwnd, WM_NCPAINT, (WPARAM)region, 0); - - exStyle = GetWindowLongW(hwnd, GWL_EXSTYLE); - if (!(exStyle & WS_EX_CLIENTEDGE)) - { - CloseThemeData(theme); - return DefWindowProcW(hwnd, WM_NCPAINT, (WPARAM)region, 0); - } - - cxEdge = GetSystemMetrics(SM_CXEDGE); - cyEdge = GetSystemMetrics(SM_CYEDGE); - GetWindowRect(hwnd, &r); - - /* New clipping region passed to default proc to exclude border */ - clipRgn = CreateRectRgn(r.left + cxEdge, r.top + cyEdge, r.right - cxEdge, r.bottom - cyEdge); - if (region != (HRGN)1) - CombineRgn(clipRgn, clipRgn, region, RGN_AND); - OffsetRect(&r, -r.left, -r.top); - - dc = GetDCEx(hwnd, region, DCX_WINDOW | DCX_INTERSECTRGN); - if (IsThemeBackgroundPartiallyTransparent(theme, 0, 0)) - DrawThemeParentBackground(hwnd, dc, &r); - DrawThemeBackground(theme, dc, 0, 0, &r, 0); - ReleaseDC(hwnd, dc); - CloseThemeData(theme); - - /* Call default proc to get the scrollbars etc. also painted */ - DefWindowProcW(hwnd, WM_NCPAINT, (WPARAM)clipRgn, 0); - DeleteObject(clipRgn); - return 0; -} - static LRESULT DATETIME_MouseMove (DATETIME_INFO *infoPtr, LONG x, LONG y) { TRACKMOUSEEVENT event; @@ -1532,17 +1490,6 @@ DATETIME_StyleChanged(DATETIME_INFO *infoPtr, WPARAM wStyleType, const STYLESTRU return 0; }
-static LRESULT DATETIME_ThemeChanged (DATETIME_INFO *infoPtr) -{ - HTHEME theme; - - theme = GetWindowTheme(infoPtr->hwndSelf); - CloseThemeData(theme); - OpenThemeData(infoPtr->hwndSelf, themeClass); - InvalidateRect(infoPtr->hwndSelf, NULL, TRUE); - return 0; -} - static BOOL DATETIME_GetIdealSize(DATETIME_INFO *infoPtr, SIZE *size) { SIZE field_size; @@ -1636,7 +1583,7 @@ DATETIME_Create (HWND hwnd, const CREATESTRUCTW *lpcs) infoPtr->hFont = GetStockObject(DEFAULT_GUI_FONT);
SetWindowLongPtrW (hwnd, 0, (DWORD_PTR)infoPtr); - OpenThemeData(hwnd, themeClass); + COMCTL32_OpenThemeForWindow(hwnd, WC_SCROLLBARW);
return 0; } @@ -1646,10 +1593,7 @@ DATETIME_Create (HWND hwnd, const CREATESTRUCTW *lpcs) static LRESULT DATETIME_Destroy (DATETIME_INFO *infoPtr) { - HTHEME theme; - - theme = GetWindowTheme(infoPtr->hwndSelf); - CloseThemeData(theme); + COMCTL32_CloseThemeForWindow(infoPtr->hwndSelf);
if (infoPtr->hwndCheckbut) DestroyWindow(infoPtr->hwndCheckbut); @@ -1777,7 +1721,7 @@ DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return DATETIME_NCCreate (hwnd, (LPCREATESTRUCTW)lParam);
case WM_NCPAINT: - return DATETIME_NCPaint(hwnd, (HRGN)wParam); + return COMCTL32_NCPaint(hwnd, wParam, lParam, WC_EDITW);
case WM_MOUSEMOVE: return DATETIME_MouseMove(infoPtr, (SHORT)LOWORD(lParam), (SHORT)HIWORD(lParam)); @@ -1816,7 +1760,7 @@ DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return DATETIME_StyleChanged(infoPtr, wParam, (LPSTYLESTRUCT)lParam);
case WM_THEMECHANGED: - return DATETIME_ThemeChanged(infoPtr); + return COMCTL32_ThemeChanged(infoPtr->hwndSelf, WC_SCROLLBARW, TRUE, TRUE);
case WM_SETFONT: return DATETIME_SetFont(infoPtr, (HFONT)wParam, (BOOL)lParam);
v2: Consolidate comctl32 v6 macro checks.
This merge request was approved by Nikolay Sivov.