[英]Why should the host window not have CS_HREDRAW and CS_VREDRAW window styles?
I was reading the SimpleRibbon sample application and I noticed a curious line in the source:我正在阅读 SimpleRibbon 示例应用程序,并注意到源代码中有一行奇怪的内容:
wcex.style = 0; // Don't use CS_HREDRAW or CS_VREDRAW with a Ribbon
I can't find any reference on MSDN or elsewhere that explains why these window classes shouldn't be used in a window that contains a ribbon.我在 MSDN 或其他地方找不到任何参考资料来解释为什么不应在包含功能区的窗口中使用这些窗口类。 Does anyone know what this is all about?
有谁知道这是怎么回事?
Cheers.干杯。
Sample code: GitHub Windows-classic-samples - SimpleRibbon.cpp示例代码: GitHub Windows-classic-samples - SimpleRibbon.cpp
check this link http://www.catch22.net/tuts/win32/flicker-free-drawing .检查此链接http://www.catch22.net/tuts/win32/flicker-free-drawing 。
I was having terrible flickering when resizing my custom text view widget.调整自定义文本视图小部件的大小时,我的闪烁很严重。 Then this tutorial told me to remove CS_HREDRAW and CSVREDRAW.
然后本教程告诉我删除 CS_HREDRAW 和 CSVREDRAW。 I immediately saw that flickering was gone!
我立即看到闪烁消失了! Now my question is, what the heck is the purpose of these styles.
现在我的问题是,这些样式的目的到底是什么。 Since they only do bad.
因为他们只做坏事。
Note that Windows 7 fixed flickering.请注意,Windows 7 修复了闪烁问题。 So even if your app flickers crazy on Windows Xp, it will won't flicker on Windows 7.
因此,即使您的应用程序在 Windows Xp 上疯狂闪烁,它也不会在 Windows 7 上闪烁。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.