根据 MSDN documentation您可以将过滤器栏添加到 ListView :
By specifying the HDS_FILTERBAR window style for a header control, you can enable the placement of filter edit boxes underneath the column headings. A filter button appears beside the edit box.
我可以通过 HDITEM
和 HDTEXTFILTER
访问过滤器字符串,但如何更改底层编辑和按钮?
假设我想将默认过滤器文本占位符从“在此处输入文本”更改为“在此处键入”,就像 Edit_SetCueBannerText 一样或更改过滤器按钮外观?
假设:Windows Vista + , Common Control 6.0 +
最佳答案
如果您不介意一些技巧 - 您可以使用例如 EnumChildWindows()
访问子窗口 - 然后您可以使用 hwnd 发送命令等。首先在您正在运行的程序上使用“spy++”来调查父/子窗口关系的结构。
关于c++ - Win32 : How to access Windows Listview Header Control Filters,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53648872/