Window redraw after losing focus to the console

Hello all,

I have a problem with window redrawing using SDL. I am writing a simple
spline-program that is to draw splines to the screen. The user can control
this through commands in the console. I made this by creating an SDL_Surface
and using std::cin to get input from the user. However, as soon as the user
clicks on the console window to type something, the drawing window goes
blank. So when the drawing window looses focus, it goes blank. I tried
redrawing it, but that did not work. When I give the focus back to the
drawing window, it does not redraw and remains blank. In some cases when I
click the console, the drawing window remains drawn for a few seconds and
then goes blank anyway. By going blank, I mean that the window turns all
white and does not show what I am writing to it anymore.

This happens in Windows XP in both release and debug mode. I have not been
able to try it in any other OS.

How can I fix this problem?

Thanks in advance,
Joost -Oogst- van Dongen_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/