ChildWindow Smear when dragging

I have an app where different ChildWindows use the GLControl within a MDI environment.
When one ChildWindow is dragged over another one, it leaves smears on the underlying ChildWindow.
Does anybody know how to prevent this ?
Thanks - Claude

Keeping in mind that Microsoft recommends against using MDI, they have converted their apps away from using it, it has significant disadvantages, and it sounds like it’s a pain-in-the-rear to make behave reasonably…

Check out these links. Sounds like you’ll want to override WM_ERASEBKGND and do nothing, and then either fully repaint your window in WM_PAINT or ignore that thing and do repaint on a timer. Also use CS_OWNDC so that the DC doesn’t change frequently. If you still have problems, it sounds like MDI is single-buffered (i.e. needs continual redraw on coverage changes), and you have to jump through hoops to force double-buffering. And that’s just for starters.

Have fun!

Good evening Dark_Photon,
Thank you for the “starters”. Certainly gives me something to start looking at.
Forgot to say clearly that the smears appear only when a ChildWindow with a GLControl is moved over another ChildWindow with a GLControl. Given in OpenGL only one Context is active at any time, maybe is this linked ?
Azzar

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.