修改行高 用图片填充行高
CImageList m_l;
m_l.Create(1, 30, TRUE | ILC_COLOR32, 1, 0);
m_list.SetImageList(&m_l, LVSIL_SMALL);
m_list.InsertColumn(0, L"Text1", 0, 80);
m_list.InsertColumn(1, L"Text2", 0, 100);
//填充行高
CImageList m_l;
m_l.Create(1, 30, TRUE | ILC_COLOR32, 1, 0);
m_list.SetImageList(&m_l, LVSIL_SMALL);
int nRow = 0;
nRow = m_list.InsertItem(0, L"ddfasf");
bool bRes = m_list.SetItemText(nRow, 1, L"44646");
nRow = m_list.InsertItem(1, L"3333");
//用\r\n来换行
m_list.SetItemText(nRow, 1, L"45664646\r\n64gsgfsgfsgd5564");
本文介绍如何利用CImageList类创建图像列表并设置ListView控件的行高,通过插入列和项来展示不同高度的文本内容。同时,演示了如何通过插入换行符实现文本换行。
3786

被折叠的 条评论
为什么被折叠?



