在远程会话上运行时,LVS_EX_DOUBLEBUFFER 是否正确地不是双缓冲?

发布于 2024-10-10 07:54:57 字数 302 浏览 0 评论 0原文

本地运行时应该使用双缓冲,但如果希望获得每种模式的最佳性能,则当窗口处于远程会话时不要使用双缓冲。

ListView 控件具有扩展样式 LVS_EX_DOUBLEBUFFER,它会自动双缓冲ListView 的内容。

是否需要注册才能收到有关本地和远程会话之间的更改的通知,并相应地更新此标志?或者 ListView 会自动执行此操作吗?

One is supposed to use double buffering when running locally, but to not use double buffering when the window is on a remote session, if one wants to have the best performance of each mode.

The ListView control has an extended style, LVS_EX_DOUBLEBUFFER, which automatically double buffers the contents of the ListView.

Does one need to register to be notified on changes between local and remote sessions, and update this flag accordingly? Or does the ListView do this automatically?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡紫姑娘! 2024-10-17 07:54:58

ListView 不会自动调整自身以适应您是在远程还是本地运行。它尊重您在创建控件时设置的扩展样式标志的值;如果您设置了LVS_EX_DOUBLEBUFFER,则显示将是双缓冲的,如果您不设置,则不会。我确信 Raymond Chen 会同意任何其他行为都会是一个错误。

您可以随时使用 LVM_SETEXTENDEDLISTVIEWSTYLE

SendMessage(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_DOUBLEBUFFER, isRemote ? 0 : LVS_EX_DOUBLEBUFFER);

链接文章之后的下一篇文章介绍了如何在本地和远程之间的显示更改时收到通知:http://blogs.msdn.com/b/oldnewthing/archive/2006/01/04/509194.aspx

The ListView does not automatically adjust itself to whether you're running remote or local. It respects the value of the extended style flags that you set when the control is created; if you set LVS_EX_DOUBLEBUFFER then the display will be double buffered, and if you don't it won't. I'm sure Raymond Chen would agree that any other behavior would be a bug.

You can change the state of the flag at any time with LVM_SETEXTENDEDLISTVIEWSTYLE:

SendMessage(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_DOUBLEBUFFER, isRemote ? 0 : LVS_EX_DOUBLEBUFFER);

Tthe next article after your linked one shows how to get notified when the display changes between local and remote: http://blogs.msdn.com/b/oldnewthing/archive/2006/01/04/509194.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文