多行图像CListCtrl MFC [英] Multi Images in one row CListCtrl MFC

查看:105
本文介绍了多行图像CListCtrl MFC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我想在CListCtrl MFC的一行中插入多个图像。

我创建了一个CImageList并显示它在CListCtrl中成功。但只是一个图像连续。当我在CListCtrl中分配多个CImageList时,它无法准确显示。



在任何帮助中提前感谢。



抱歉我的英语不好。

解决方案

您可以使用自定义绘图来模拟每行多个图标。

http://msdn.microsoft.com/en-us/library/bb761817(v=vs.85).aspx [ ^ ]



你应该处理项目预制活动以在正确的地方画出你的图标。


Luong ...你有没有解决过这个问题多年前?我不确定您是否选择使用LVS_REPORT样式。我是,并按照这个例子

使用虚拟CListCtrl显示文本和位图 [ ^ ]

并调整它以测试pItem-> iSubItem以在您想要的列中显示图像

Hi all,

I want to insert multi images in one row of CListCtrl MFC.
I have created a CImageList and display it in CListCtrl successfully. But just one image in a row. When I assign more than 1 CImageList in CListCtrl, it can't display exactly.

Thanks in advance in any help.

Sorry for my poor English.

解决方案

You can use custom drawing to emulate multiple icons per row.
http://msdn.microsoft.com/en-us/library/bb761817(v=vs.85).aspx[^]

You should handle item prepaint event to draw your icons in the correct places.


Luong...did you ever solve this problem years ago? I am not sure if you chose to use the LVS_REPORT style. I am, and following this example
Using a Virtual CListCtrl to Display Text and Bitmaps[^]
and tweaking it to test on pItem->iSubItem to display the image in the column you want.


这篇关于多行图像CListCtrl MFC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆