Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/comctl32/ipaddress.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c index c7b9ada1f6a..b6302a89ba6 100644 --- a/dlls/comctl32/ipaddress.c +++ b/dlls/comctl32/ipaddress.c @@ -145,7 +145,7 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc)
GetClientRect (infoPtr->Self, &rect);
- theme = OpenThemeData(infoPtr->Self, WC_EDITW); + theme = GetWindowTheme (infoPtr->Self);
if (theme) { DWORD dwStyle = GetWindowLongW (infoPtr->Self, GWL_STYLE); @@ -193,9 +193,6 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc) DrawTextW(hdc, L".", 1, &rect, DT_SINGLELINE | DT_CENTER | DT_BOTTOM); }
- if (theme) - CloseThemeData(theme); - return 0; }
@@ -255,6 +252,7 @@ static LRESULT IPADDRESS_Create (HWND hwnd, const CREATESTRUCTA *lpCreate) }
IPADDRESS_UpdateText (infoPtr); + OpenThemeData (infoPtr->Self, WC_EDITW);
return 0; } @@ -262,6 +260,7 @@ static LRESULT IPADDRESS_Create (HWND hwnd, const CREATESTRUCTA *lpCreate)
static LRESULT IPADDRESS_Destroy (IPADDRESS_INFO *infoPtr) { + HTHEME theme; int i;
TRACE("\n"); @@ -272,6 +271,8 @@ static LRESULT IPADDRESS_Destroy (IPADDRESS_INFO *infoPtr) }
SetWindowLongPtrW (infoPtr->Self, 0, 0); + theme = GetWindowTheme (infoPtr->Self); + CloseThemeData (theme); heap_free (infoPtr); return 0; } @@ -456,6 +457,13 @@ static BOOL IPADDRESS_GotoNextField (const IPADDRESS_INFO *infoPtr, int cur, int return FALSE; }
+static LRESULT IPADDRESS_ThemeChanged (const IPADDRESS_INFO *infoPtr) +{ + HTHEME theme = GetWindowTheme (infoPtr->Self); + CloseThemeData (theme); + theme = OpenThemeData (theme, WC_EDITW); + return 0; +}
/* * period: move and select the text in the next field to the right if @@ -618,6 +626,9 @@ IPADDRESS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) COMCTL32_RefreshSysColors(); return 0;
+ case WM_THEMECHANGED: + return IPADDRESS_ThemeChanged (infoPtr); + case IPM_CLEARADDRESS: return IPADDRESS_ClearAddress (infoPtr);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=86272
Your paranoid android.
=== debiant2 (build log) ===
Task: WineTest did not produce the win32 report
=== debiant2 (build log) ===
Task: WineTest did not produce the wow32 report