uxtheme: also send WM_THEMECHANGED to child windows

Dimi Paun dimi at lattica.com
Sun Jul 3 11:01:51 CDT 2005


On Sun, 2005-07-03 at 15:11 +0200, Frank Richter wrote:
> +static void UXTHEME_broadcast_themechange (HWND hWnd)
> +{
> +    if (hWnd == NULL)
> +    {
> +       EnumWindows (UXTHEME_EnumChildProc, 0);
> +    }
> +    else
> +    {
> +       if (hWnd != NULL) PostMessageW(hWnd, WM_THEMECHANGED, 0, 0);
> +       EnumChildWindows (hWnd, UXTHEME_EnumChildProc, 0);
> +    }
> +}

This function would be more useful (and usage clearer) if it
took the msg as an argument (also I think you can get rid of
UXTHEME_EnumChildProc too, untested):

+static BOOL UXTHEME_broadcast_msg (HWND hWnd, LPARAM msg)
+{
+    if (hWnd == NULL)
+    {
+        EnumWindows (UXTHEME_broadcast_msg, msg);
+    }
+    else
+    {
+        PostMessageW(hWnd, msg, 0, 0);
+        EnumChildWindows (hWnd, UXTHEME_broadcast_msg, msg);
+    }
+    return TRUE;
+}

Note: the 'if' for PostMessageW was superfluous.

-- 
Dimi Paun <dimi at lattica.com>
Lattica, Inc.




More information about the wine-devel mailing list