I'm trying to set up a ListView to display a list of files, and I want the icon of each file to be displayed. I think I need to use the ExtractAssociatedIcon API, but I don't know how to get the extracted icon into the listview.
Printable View
I'm trying to set up a ListView to display a list of files, and I want the icon of each file to be displayed. I think I need to use the ExtractAssociatedIcon API, but I don't know how to get the extracted icon into the listview.
You need to draw it with drawicon api on a DC to a picture, which you add to a imagelist control. set a common key to both the list item and node so you can set the node image property more flexibly