Toolbar background error
gerard.patel at nerim.net
Fri Aug 17 16:09:15 CDT 2001
At 11:08 AM 17/08/2001 -0700, you wrote:
>That's not what Windows does. If you pass a window DC to WM_ERASEBKGND
>it only erases an area equivalent to the client area (shifted to be
>relative to the whole window), so GetClientRect is correct IMO. The
>non-client area should be painted upon WM_NCPAINT, not WM_ERASEBKGND.
How do you test this under Windows ?
In my test app, I have a white brush as class brush. So my window is white.
If I add after the BeginPaint :
r.top += 200;
FillRect(ps.hdc, &r, (HBRUSH) COLOR_WINDOW)
the lower part of my window is painted with the beautiful window color (brown)
Now if I add immediately after :
hdc = GetWindowDC(hwnd);
SendMessage(hwnd, WM_ERASEBKGND, (WPARAM) hdc, 0);
I get a window that is completely white; maybe I am missing something but
I should see a small brown strip at the lower part of the window, corresponding
to the caption + menu height, no ?
More information about the wine-devel