WM_ERASEBKGND might be useful to at least clear the background to a single color when resizing. If you specify a default background brush when creating the window WM_ERASEBKGND should handle it for us.
What would be ideal is to detect WM_SIZING messages and then have the window background be repainted by the user or a default function if not specified.
I will have to hack on Allegro for a while and see what I can come up with.
Here are some of the events that are being fired during a window resize :
It starts out with WM_PAINT when the window is opened.
Then WM_WINDOWPOSCHANGING and WM_ENTERSIZEMOVE and WM_SIZING when you grab the handle on the window to resize it. Then a bunch of groups of these :
and then closes with a group of
when you let go of the window handle.
So something we could do is provide a default background brush when creating the window handle. Also, we should be able to set a default clear color for the window when resized.
EDIT 2 :
Changing it to window_class.hbrBackground = (HBRUSH)(COLOR_BACKGROUND + 1); clears the screen to black during each resize, blanking out what was showing. That's not quite what we want, but it is a start.