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!
- OpenGL [MDI] window cleared with no WM_PAINT message
- Native Win32 API OpenGL Tutorial - Part 2 [-- with MDI]
- Flicker-free Painting
- Flicker-Free for MDIClient - VB.NET
- Platform specifics: Windows # What should I do before the window is created?
- The WM_PAINT Message
- Using the WM_PAINT Message
- WM_ERASEBKGND message
- GetDC, ReleaseDC, CS_OWNDC with OpenGL and Gdi+
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.