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 <[EMAIL PROTECTED]>
Lattica, Inc.


Reply via email to