I’m trying to write an application with OpenGL interface on VC++ 2005, borrowing heavily from a similar application I wrote last year in VC++ 2008 which works well.
However, when I refresh the GUI using RedrawWindow or Invalidate, I get white lines flashing momentarily across the OpenGL drawing area, somewhat similar to the effect you’d see on an old TV with reception problems.
This doesn’t happen when running the old application on the same PC.
Is there any known bug related to VS, OpenGL, or anything else that might be causing this? Or should I be using a different command to refresh the display?
Still no luck. Googling this function I found another thread where you mentioned obtaining this function with GetProcAddress but you didn’t specify what DLL it should be in…
Well, I got the problem solved. Inexplicably, what was apparently missing was the ON_WM_ERASEBKGND() event; once I overrode the method OnEraseBkgnd(CDC* pDC) to always return TRUE the problem went away.