static CImageList ProcessImg; 定义在头文件
str->InsertItem(
0, pe32.szExeFile, imageIndex); imageIndex对应图标索引
0 1 2 3这样排列
hImageList = (HIMAGELIST)::SHGetFileInfo(tsFileDosPath,
0, &shfileinfo,
sizeof(shfileinfo), SHGFI_ICON);
if (hImageList ==
0)
{
ProcessImg.Add(AfxGetApp()->
LoadIcon(IDR_MAINFRAME));
}
else
{
ProcessImg.Add(shfileinfo.hIcon);
}
str->SetImageList(&ProcessImg, LVSIL_SMALL);
转载于:https://www.cnblogs.com/IMyLife/p/4826151.html
相关资源:JAVA上百实例源码以及开源项目