- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我有一个静态控件,它在创建时具有 SS_OWNERDRAW
和 SS_NOTIFY
标志。它的父窗口有 WS_EX_COMPOSITED
标志。
在Windows XP下,绘制不正确,如下图(右上角的矩形):
但在Windows 7下,它是正确绘制的,如下图所示(右上角的“X”):
如何在 XP 中解决这个问题?此外,是什么原因导致此问题(在 XP 中)?
最佳答案
CreateWindowEx()
的 MSDN 是这样说的:
With WS_EX_COMPOSITED set, all descendants of a window get bottom-to-top painting order using double-buffering. Bottom-to-top painting order allows a descendent window to have translucency (alpha) and transparency (color-key) effects, but only if the descendent window also has the WS_EX_TRANSPARENT bit set. Double-buffering allows the window and its descendents to be painted without flicker.
即子 STATIC
控件应该设置 WS_EX_TRANSPARENT
。
关于c++ - OwnerDraw 与 WS_EX_COMPOSITED 在 XP 下,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14889949/
我有一个表单,上面有许多自定义控件,闪烁很糟糕,我发现了以下代码(在搜索解决方案时在 stackoverflow 上,How to fix the flickering in User control
当从最小化状态恢复时,Form 需要无穷无尽的时间来重新绘制。 Form 是无边界的。我正在覆盖 WndProc 和 CreateParms。 我正在将无边界 Form 从最小化状态恢复到正常状态。
创建一个 WS_EX_COMPOSITED 风格的窗口: hWnd = CreateWindowEx(WS_EX_COMPOSITED, szWindowClass, szTitle, WS_O
我在我的应用程序中使用 WS_EX_COMPOSITED 样式但它运行 CPU 到 100%,有没有办法停止我的应用程序绘图一段时间并仅在我需要时恢复?有些人建议使用 Sleep's,但我应该将 sl
我有一个使用 WTL 8.1 开发的适用于 Windows XP SP3 的 VS2008 C++ 应用程序。我的应用程序包含一个选项卡控件,它会在调整应用程序边框大小时闪烁。 我的窗口层次结构如下所
我有一个 TableLayoutPanel,我可以在其中使用布局内的控件进行一些拖放操作。不幸的是,控件在下降操作后闪烁。我在所有控件和许多其他东西上尝试了 DoubleBuffered=true 。
我有一个静态控件,它在创建时具有 SS_OWNERDRAW 和 SS_NOTIFY 标志。它的父窗口有 WS_EX_COMPOSITED 标志。 在Windows XP下,绘制不正确,如下图(右上角的
为了解决闪烁问题,我求助于在 winforms 应用程序中使用 WS_EX_COMPOSITED。在选项卡控件获得如此多的选项卡以致于它创建“滚动箭头”之前,这种方法非常有效。此时,我的整个应用程序看
我是一名优秀的程序员,十分优秀!