简体   繁体   English

如何在CListCtrl中拆分单个单元格

[英]How to split single cells in a CListCtrl

I'm currently working on a C++/MFC Application, and I have various List controls(eg. CListCtrlStyled objects: 我目前正在使用C ++ / MFC应用程序,并且具有各种列表控件(例如CListCtrlStyled对象:

I need a way to split individual rows in multiple columns , without changing the cells in the same row. 我需要一种在 更改同一行中的单元格的情况下 将单独的行拆分为多列的方法

Here you can see the result I want to achieve. 在这里您可以看到我想要达到的结果。

At first, I thought to insert a list inside another, but this way it does not seem feasible ... is there any other way to get a similar effect? 一开始,我想在另一个列表中插入一个列表,但是这种方式似乎不可行...还有其他方法可以得到类似的效果吗? Links to external docs and/or sample code are welcome. 欢迎链接到外部文档和/或示例代码。

Thanks 谢谢

IT

You can use 您可以使用

LPNMHEADER phdr = reinterpret_cast(pNMHDR); LPNMHEADER phdr = reinterpret_cast(pNMHDR); NMLISTVIEW *pLV = (NMLISTVIEW *) pNMHDR; NMLISTVIEW * pLV =(NMLISTVIEW *)pNMHDR;

pLV->iItem; pLV-> iItem; pLV->iSubItem; pLV-> iSubItem;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM