I have a common code routine that displays in a listview, a list of files
together with their icons.
It keeps crashing with various error messages when displaying files from a
certain directory on my disk. The part of the code which produces the crash
is the part which gets the icon from the
delphi
Subject: [DUG]: Icons from files
I have a common code routine that displays in a listview, a list of files
together with their icons.
It keeps crashing with various error messages when displaying files from a
certain directory on my disk. The part of the code which produces
Pat maybe the probs with the icon handle, by not pre-allocating it?. try the
following;
function AddIcon(FileName:string; FileIndex:word):integer;
var FileCon:hicon;
begin
FileCon:=ExtractAssociatedIcon(hInstance,PChar(FileName),FileIndex);
if
Quoting Chris Crowe [EMAIL PROTECTED]:
Sounds like you are having problems there Patrick. Not a lot of help, =
but have you tried using the system image list to how the icons in the =
list view?
It works well, and you do not have to populate the image list your self.
I discovered since