Hello!
I am trying to make a simple application using OpenGL and WinAPI. I've got a dialog form where the scene - together with some windows controls (edit box, button and a check box) - is displayed. Everything seems fine but after my dialog loses focus (i.e, it hides under other window), the windows controls are not redrawed when the dialog gets its focus back again.
You can take a look and see what I mean : priv.ckp.pl/aero/window.png
I guess that the problem should be solved somewhere around WM_PAINT message. For the time being, here is what I do after getting WM_PAINT message :
case WM_PAINT: // should be called continuously
Render(); // just render GL scene (that's where SwapBuffers() is called)
return TRUE;
I'd be thankful if you could help me with this one!![]()



Once windows controls are created, I don't do anything with them. It works ok until the window hides behind some other windows and becomes visible again.
