[英]Custom CListCtrl
I need to create a ListControl in MFC, each row having different number of columns. 我需要在MFC中创建一个ListControl,每行具有不同的列数。 How can I do this?
我怎样才能做到这一点?
That's not possible. 那是不可能的。 The workaround is trivial, just don't put any text in the sub-item.
解决方法很简单,只是不要在子项目中放置任何文本。
You may refer to my guru's(Chris Maunder-Codeproject founder) article: 您可以参考我的大师(克里斯·梅德-Codeproject创始人)的文章:
http://www.codeproject.com/KB/miscctrl/gridctrl.aspx http://www.codeproject.com/KB/miscctrl/gridctrl.aspx
You could use custom-draw List Control. 您可以使用自定义绘制列表控件。 Then you can specify maximum columns for the control, but draw only specified number of columns in each row.
然后,您可以为控件指定最大列数,但每行仅绘制指定的列数。 You can fill unwanted columns with a background color.
您可以用背景色填充不需要的列。 Here's a sample of how you could create custom-draw list control.
这是如何创建自定义绘图列表控件的示例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.