如何向 ListView 添加蓝色选择矩形? [英] How to add a blue selection rectangle to ListView?
问题描述
Windows API ListView 是否支持这个选择矩形?
Does a Windows API ListView supports this selection rectangle?
推荐答案
更新
我已经纠正了.如果将 LVS_EX_DOUBLEBUFFER
添加到扩展列表视图样式,则控件执行 alpha 混合选取框选择.文档 说:
I stand corrected. If the LVS_EX_DOUBLEBUFFER
is added to the extended list view style, then the control performs alpha blended marquee selection. The documentation says:
LVS_EX_DOUBLEBUFFER
版本 6.00 及更高版本.通过双缓冲绘制,这减少了闪烁.这种扩展样式还启用了 alpha 混合选取框在支持它的系统上进行选择.
Version 6.00 and later. Paints via double-buffering, which reduces flicker. This extended style also enables alpha-blended marquee selection on systems where it is supported.
感谢@andlabs 指出这一点.
Thanks to @andlabs for pointing this out.
<打击>
Windows API ListView 是否支持这个选择矩形?
Does a Windows API ListView supports this selection rectangle?
没有.问题中的图像来自私有列表视图控件 DirectUIHWND.此控件用于各种 Microsoft 软件中,在资源管理器中尤其可见.第三方程序无权访问此控件.
No. The image in the question comes from the private list view control, DirectUIHWND. This control is used in a variety of Microsoft software and is especially visible in Explorer. Third party programs don't have access to this control.
如果您想要这样的功能,则必须自己实现.系统列表视图控件 SysListView32 没有这样的功能.罢工>
If you want functionality like this you will have to implement it yourself. The system list view control, SysListView32, has no such functionality.
这篇关于如何向 ListView 添加蓝色选择矩形?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!