When another window is dragged over an OpenGL viewport, It erases the underlying pixels:

I tried adding the CS_SAVEBITS style to the window, which had no effect:
style=GetClassLong(hwnd,GCL_STYLE)+CS_SAVEBITS
SetClassLong hwnd,GCL_STYLE,style
Here is a demo which demonstrates the problem. I need to either set the window so it "saves" the underlying pixels, or I need to detect the repaint event and flip the buffer:
http://www.leadwerks.com/post/glprob.zip
The title bar displays the hwnd to the window, so you should be able to tweak the window as the program runs.

I tried adding the CS_SAVEBITS style to the window, which had no effect:
style=GetClassLong(hwnd,GCL_STYLE)+CS_SAVEBITS
SetClassLong hwnd,GCL_STYLE,style
Here is a demo which demonstrates the problem. I need to either set the window so it "saves" the underlying pixels, or I need to detect the repaint event and flip the buffer:
http://www.leadwerks.com/post/glprob.zip
The title bar displays the hwnd to the window, so you should be able to tweak the window as the program runs.