Autor Beitrag
acnut
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 172
Erhaltene Danke: 3

Windows 7, Windows Vista, Windows XP, Ubuntu, Kubuntu, Pardus
Delphi 2010 SV, Java Editor, VS 2010 SV
BeitragVerfasst: Fr 03.09.10 19:06 
ich will von jedem prozess das dazugehörende icon in einem lsitview anzeigen und habe das hier gefunden:
www.delphi-library.d...ahieren_21351,0.html

bekomme aber wegen hinstance diese fehlermeldung:
ausblenden Delphi-Quelltext
1:
[DCC Fehler] u_win7tool.pas(1433): E2010 Inkompatible Typen: 'string' und 'Cardinal'					

was muss ich jetzt tun?
und was ist hinstance überhaupt(die delphi hilfe zeigt nichts an:( )

mfg
acnut

Moderiert von user profile iconNarses: Überflüssige Zeilenumbrüche/Leerzeilen entfernt.

---Moderiert von user profile iconNarses: Beiträge zusammengefasst---

habe das jetzt so "gelöst", aber es wird nur dasselbe icon im listview angezeigt

passt irgendwas in der schleife nicht?:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
for i := 0 to Listview1.items.Count - 1 do  begin
Process := ProcessInfo1.RunningProcesses.FindByName(ListView1.Items[i].Caption);
      if ExtractIcon(process.ExeFile, ico, 1, false, 1616, LR_DEFAULTCOLOR) then
       begin
         icon:= TIcon.Create;
         icon.Handle:= ico;
         imagelist3.AddIcon(icon);
         icon.Free;
              ListView1.Items[i].ImageIndex:= Imagelist3.Count - 1;
end;
end;



mfg
acnut
SAiBOT
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 323
Erhaltene Danke: 5

XP SP2; 7
D7; D2009
BeitragVerfasst: Mo 06.09.10 10:37 
In der ShellAPI.pas ist die Funktion richtg deklariert. Denn funktionierts auch mit hInstance.
Zitat:
HINSTANCE
A handle to the instance of the application calling the function.

_________________
Debuggers don't remove bugs, they only show them in slow-motion.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 06.09.10 10:56