Click here to Skip to main content
Sign Up to vote bad
good
See more: C++WindowsMFC
I have a MFC tabbed MDI application in which the tabbed child window types are CEditView, CRichEditView and CView. I've noticed that when I switch between them (click the top of the tab to make that window the active window) they repaint the client area, as expected, but the CEditView windows flicker .. and I can see they are repainting twice (at least) for some reason. The CView and CRichEditView windows only repaint once.
 
Even if the CEditView window is already the active tab, if I click the top of the window, it gets redrawn twice ... with a flicker.
 
Since this redraw/flicker is annoying - does anyone have an idea why it would redraw more than once?
 
Thx,
Posted 22 Dec '12 - 12:05

Comments
Nelek - 22 Dec '12 - 18:56
I had a similar problem a while ago, in my case was because I was calling the Invalidate and UpdateWindow in more places than the strictly needed. It is worth to have a look. Have you tried with the debugger and step into the code in that window?
Sajeesh payolam - 23 Dec '12 - 1:30
I think Nelek is right. Because some of your Invalidate() makes problem. This will leads to flickering. You should need to debug your code first.

1 solution

Good idea Nelek.
 
I put a breakpoint on every Invalidate and UpdateWindow in the app ... and alas it did not hit any of those.
 
It seems it is not being triggered by my code explicitly.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 489
1 Mahesh Bailwal 413
2 Maciej Los 200
3 Aarti Meswania 193
4 CPallini 140
0 Sergey Alexandrovich Kryukov 9,607
1 OriginalGriff 7,214
2 CPallini 3,943
3 Rohan Leuva 3,261
4 Maciej Los 2,758


Advertise | Privacy | Mobile
Web02 | 2.6.130516.1 | Last Updated 22 Dec 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid