Autor Beitrag
Fabian E.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 554

Windows 7 Ultimate
Visual Studio 2008 Pro, Visual Studion 2010 Ultimate
BeitragVerfasst: Fr 14.12.07 15:01 
Hallo habe ein problem mit icons, die
ich aus verschiedenen exen auslese

die icons sind machmal fehlerhaft, also
es werden andere icons dargestellt als die exe
eigentlich ta.
seht euch am besten mal den screenshot an.

die icons werden mit
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
function IconFromFile(const Filename: String; IconNr: Word): HICON;
var
  buffer: array[0..2*MAX_PATH]of Char;
begin
  StrPCopy(buffer, Filename);
  Result := ExtractAssociatedIcon(HInstance, buffer, IconNr);
end;


und
ausblenden Delphi-Quelltext
1:
2:
3:
aIcon := TICon.Create;
aIcon.Handle := IconFromFile(ExtractAnwendung(Array3[j]),j);
Form1.ImageList1.AddIcon(aIcon);


ausgelesen.

verwechslungen der icons kommen nicht in frage.

gruß
Einloggen, um Attachments anzusehen!
Fabian E. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 554

Windows 7 Ultimate
Visual Studio 2008 Pro, Visual Studion 2010 Ultimate
BeitragVerfasst: Fr 14.12.07 16:03 
okay hat sich erledigt... hatte die zählvariable bei
der Iconnummer drin. :autsch:

gruß