MFC CEditView重绘两次 [英] MFC CEditView redraws twice

查看:122
本文介绍了MFC CEditView重绘两次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MFC选项卡式MDI应用程序,其中选项卡式子窗口类型是CEditView,CRichEditView和CView。我注意到当我在它们之间切换时(单击选项卡的顶部使该窗口成为活动窗口),它们按预期重新绘制客户区,但CEditView窗口闪烁......我可以看到它们重新绘制了两次(至少)出于某种原因。 CView和CRichEditView窗口只重绘一次。



即使CEditView窗口已经是活动选项卡,如果我单击窗口顶部,它会重新绘制两次。 ..闪烁。



因为这个重绘/闪烁很烦人 - 有没有人知道它为什么会不止重绘一次?



Thx,

解决方案

好主意Nelek。



我把应用程序中的每个Invalidate和UpdateWindow都有一个断点...唉它没有点击任何一个。



似乎它没有被我的代码明确触发

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,

解决方案

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.


这篇关于MFC CEditView重绘两次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆