Powered by |
How to get system's file extension associated icons?Original idea was found at CodeGuru. I extracted the required source files and did some minor modifications. Example of how it can be used: CListCtrl serverListCtrl;
CShellList shellIconList;
shellIconList.CreateImageList();
serverListCtrl.SetImageList(&shellIconList.m_Small, LVSIL_SMALL);
serverListCtrl.SetImageList(&shellIconList.m_Large, LVSIL_NORMAL);
for(...) {
icon = shellIconList.AddExtIcon(file->name);
serverListCtrl.InsertItem(nCounter++, file->name, icon);
}
Check out the FtpUpdate project on this site to see how it could be integrated.
|