c++ win32 复选框列表 - 多项选择
我想向我的 win32 应用程序添加一个复选框列表,因为我需要一个具有多重选择的控制元素。我搜索了 msdn 文档,并在本文中找到了我需要的内容: https://msdn.microsoft.com/en-us/library/windows/desktop/dn742407.aspx。但我找不到任何与之相关的代码。这是一个特殊的控制元件吗?或者这只是一个充满复选框的列表视图?或者这是组合框控件的特殊样式?如果有人可以提供示例或提供控件文档的链接,我将不胜感激。
i would like to add a list of check boxes to my win32 application, because i need a control element with multiple selection. I've searched the msdn docs and found exactly what i need in this article: https://msdn.microsoft.com/en-us/library/windows/desktop/dn742407.aspx. But i can't find any code related to it. Is this a special control element? Or is this just a list view filled with check boxes? Or is this a special style for the combo box control? Would appreciate if someone could provide an example or provide a link to the documentation of the control.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该屏幕截图是一个带有
LVS_EX_CHECKBOXES
的 ListView 控件。您链接到的文档是 UI 指南,而不是编程文档。它谈论的是 UI 设计,而不是编程控件名称。
That screenshot is a ListView control with
LVS_EX_CHECKBOXES
.The documented you linked to is UI guidance, not programming documentation. It's talking about UI design, not programmatic control names.
这似乎不是标准 LISTBOX 控件的内置功能,或者会有一个
LBS_xxx
样式常量来启用它。MFC 提供了一个类
CCheckListBox
来执行此操作。This does not appear to be a built-in capability to the standard LISTBOX control, or there would be a
LBS_xxx
style constant to enable it.MFC provides a class
CCheckListBox
to do this.