In addition to Larry's answer.
A sample code of extracting an icon into ImageList you can find in message #
656045.
>Has anybody had any success in setting the icon in a treeview control to the icon associated with a file?
>
>I wish to have the subnodes of a treeview control display the icon based on the file extension of a file.
>
>I would assume that I would use the ExtractAssociatedIcon API call to accomplish this, but every time I think I am on the right track I get the C00000005 error in VFP7 SP1.