Click here to Skip to main content
11,580,926 members (64,947 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C++ Windows MFC
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?

Posted 22-Dec-12 12:05pm
Nelek at 22-Dec-12 18:56pm
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?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.

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

  Print Answers RSS
0 Frankie-C 195
1 OriginalGriff 184
2 F-ES Sitecore 80
3 Andy Lanng 75
4 Afzaal Ahmad Zeeshan 75
0 OriginalGriff 1,108
1 Sergey Alexandrovich Kryukov 785
2 Abhinav S 622
3 F-ES Sitecore 500
4 Suvendu Shekhar Giri 433

Advertise | Privacy | Mobile
Web04 | 2.8.150603.1 | Last Updated 22 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100