MFC,c++ 在屏幕上显示和隐藏 Ctrl 时,我可以暂时禁用绘画吗
我有一个屏幕,上面有 20 个控件。 我想显示所有二十个,然后仅隐藏与我正在处理的内容无关的那些。
psudoCode.
for each element
show element
for each element in hide list
hide element.
我的问题是屏幕在循环之间绘制。 看起来非常难看。
我知道我已经看到了这一点,但我一生都找不到该代码,甚至不记得我在哪个应用程序中看到过该代码。
有谁知道如何暂停绘画一会儿?
I have a screen with say 20 controls on it.
I want to show all twenty, then hide only the ones that don't relate to what I'm working on.
psudoCode.
for each element
show element
for each element in hide list
hide element.
My problem is that between the loops the screen paints. It looks very ugly.
I know I've seen this done but for the life of me I can't find that code, or even remember what app I'd seen that code in..
Does anyone know how to suspend the paint for a bit?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如不久前有人向我建议的那样,使用 CWnd::SetRedraw
As someone suggested to me not long ago, use CWnd::SetRedraw