Hi,
First, this is going to be a long post, sorry ;-)
You might have noticed, that I have been working on the desk.cpl
appearance tab, wich is working partly.
Here's the first version: http://www.reactos.org/bugzilla/show_bug.cgi?id=1732
Some things still don't work. For example the desktop doesn't get
repainted in the new color.
Thanks for helping, James. I tried it, but it doesn't work.
1.) Sending WM_SYSCOLORCHANGE on WM_CREATE will probably do nothing,
because the desktop has just been created with the initial SysColors,
no need to update them.
2.) RedrawWindow calls NtUserRedrawWindow wich calls
co_UserRedrawWindow wich calls co_IntPaintWindows wich sends a WM_PAINT
message to the desktop window.
WM_PAINT is then passed to DefWindowProc and passed on to
User32DefWindowProc wich does only repaint the icon as it seems.
So WM_PAINT must be evaluated in DesktopWndProc.
I tried the following:
case WM_PAINT:
{
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hwnd, &ps);
PaintDesktop(hdc);
EndPaint(hwnd, &ps);
}
PaintDesktop calls NtUserPaintDesktop, wich then paints the desktop.
I have also replaced
DesktopBrush = (HBRUSH)UserGetClassLongPtr(WndDesktop->Class,
GCL_HBRBACKGROUND, FALSE);
with
DesktopBrush = IntGetSysColorBrush(COLOR_BACKGROUND);
But the desktop is still painted in the original color, whereas the
icon text is in the color I have set in the registry.
I played a little around with the code in NtUserPaintDesktop. I added
the following code before the desktop background is painted:
if (IntGetSysColor(COLOR_BACKGROUND) == 0) //
This is true after SysColors are loaded from Registry
{
DesktopBrush = IntGetSysColorBrush(COLOR_ACTIVECAPTION);
}
And suddenly the desktop is painted in COLOR_ACTIVECAPTION.
This is strange, because I also added CreateSysColorObjects(); at the
beginning of NtUserPaintDesktop.
Anybody any idea?