windows resizing problem

I have a mainwindow with a dialog bar on the side. The dialog bar has a CStatic window . Both windows support opengl. When I start the application a scene is rendered in each window. In Ontimer(), i change the scenes and it updates fine. No Flicker, no problem.

The problem arises when I try to resize the application window. The mainwindow resizes fine. The scene is drawn correctly.

But the window on the dialog bar just shows the background color that I have set with glClearColor(). The scene is nowhere to be found.

Any clues?