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.
On 03.07.2005 18:01, Dimi Paun wrote:
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):
True.
Note: the 'if' for PostMessageW was superfluous.
Well, technically, according to MSDN for NULL: "The function behaves like a call to PostThreadMessage with the dwThreadId parameter set to the identifier of the current thread." Practically it's probably as good as not posting it all.
-f.r.
On 03.07.2005 18:15, Frank Richter wrote:
Well, technically, according to MSDN for NULL: "The function behaves
...nevermind that the block wouldn't even be called for NULL. Duh.
-f.r.
On 03.07.2005 18:15, Frank Richter wrote:
Well, technically, according to MSDN for NULL: "The function behaves
...nevermind that the block wouldn't even be called for NULL. Duh.
-f.r.