Controls on a view
-
Hello! Maybe this is a simple question, but the answer still eludes me. I have a simple SDI project with one view (call it CMyView) and I draw something on the view in the OnDraw() function. On top of the view are displayed a number of child windows of the view. If I call Invalidate() on the view, there is a noticeable flicker when the child controls are redrawn. Since both the controls and the view use CMemDC to prevent flicker when drawing, I am forced to conclude that this flicker is the result of the view becoming the topmost window while it is painting, then the child windows coming into the foreground again. Is this analysis correct? Is there any way to prevent this flicker? Thanks in advance! Sincerely, Alexander Wiseman Est melior esse quam videri It is better to be than to seem
-
Hello! Maybe this is a simple question, but the answer still eludes me. I have a simple SDI project with one view (call it CMyView) and I draw something on the view in the OnDraw() function. On top of the view are displayed a number of child windows of the view. If I call Invalidate() on the view, there is a noticeable flicker when the child controls are redrawn. Since both the controls and the view use CMemDC to prevent flicker when drawing, I am forced to conclude that this flicker is the result of the view becoming the topmost window while it is painting, then the child windows coming into the foreground again. Is this analysis correct? Is there any way to prevent this flicker? Thanks in advance! Sincerely, Alexander Wiseman Est melior esse quam videri It is better to be than to seem
Windows are painted back to front. So the view redraws, then all the controls draw on top of it. Try setting the
WS_CLIPCHILDREN
style on the view window. [edit] i'd originally put WSCLIPSIBLINGS instead... ugh... need coffee... :-O---
Shog9 If I could sleep forever, I could forget about everything...