diff --git a/dll/win32/uxtheme/system.c b/dll/win32/uxtheme/system.c index 48968556780..deb84ce9955 100644 --- a/dll/win32/uxtheme/system.c +++ b/dll/win32/uxtheme/system.c @@ -79,7 +79,7 @@ static BOOL CALLBACK UXTHEME_broadcast_msg_enumchild (HWND hWnd, LPARAM msg) } /* Broadcast a message to *all* windows, including children */ -static BOOL CALLBACK UXTHEME_broadcast_msg (HWND hWnd, LPARAM msg) +BOOL CALLBACK UXTHEME_broadcast_msg (HWND hWnd, LPARAM msg) { if (hWnd == NULL) { diff --git a/dll/win32/uxtheme/themehooks.c b/dll/win32/uxtheme/themehooks.c index 2558b50d30f..727848bdbdf 100644 --- a/dll/win32/uxtheme/themehooks.c +++ b/dll/win32/uxtheme/themehooks.c @@ -130,8 +130,6 @@ ThemeInitApiHook(UAPIHK State, PUSERAPIHOOK puah) UAH_HOOK_MESSAGE(puah->WndProcArray, WM_THEMECHANGED); UAH_HOOK_MESSAGE(puah->WndProcArray, WM_UAHINIT); - UXTHEME_LoadTheme(); - return TRUE; } @@ -143,6 +141,7 @@ ThemeHooksInstall() { PVOID lpFunc; OSVERSIONINFO osvi; + BOOL ret; lpFunc = GetProcAddress(GetModuleHandle("user32.dll"), "RegisterUserApiHook"); @@ -153,7 +152,7 @@ ThemeHooksInstall() if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1) { PREGISTER_UAH_WINXP lpfuncxp = (PREGISTER_UAH_WINXP)lpFunc; - return lpfuncxp(hDllInst, ThemeInitApiHook); + ret = lpfuncxp(hDllInst, ThemeInitApiHook); } else if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) { @@ -166,13 +165,17 @@ ThemeHooksInstall() uah.m_dllname2 = NULL; uah.m_funname2 = NULL; - return lpfunc2003(&uah); + ret = lpfunc2003(&uah); } else { UNIMPLEMENTED; - return FALSE; + ret = FALSE; } + + UXTHEME_broadcast_msg (NULL, WM_THEMECHANGED); + + return ret; } BOOL WINAPI diff --git a/dll/win32/uxtheme/uxthemedll.h b/dll/win32/uxtheme/uxthemedll.h index b022df718bc..a11860976ef 100644 --- a/dll/win32/uxtheme/uxthemedll.h +++ b/dll/win32/uxtheme/uxthemedll.h @@ -96,6 +96,7 @@ HRESULT WINAPI ParseThemeIniFile(LPCWSTR pszIniFileName, LPWSTR pszUnknown, extern void UXTHEME_InitSystem(HINSTANCE hInst); extern void UXTHEME_LoadTheme(void); +extern BOOL CALLBACK UXTHEME_broadcast_msg (HWND hWnd, LPARAM msg); /* No alpha blending */ #define ALPHABLEND_NONE 0