Einzelnen Beitrag anzeigen

runger
(Gast)

n/a Beiträge
 
#3

Re: Icons aus shell32.dll auslesen

  Alt 16. Nov 2005, 06:18
Hallo,

ändere das Ganze so um dann geht's:

Delphi-Quellcode:
Function IconLesen(icon_nr_s : cardinal) : TIcon;

var
h :HINST;

begin
  Result := nil;
// h := LoadLibrary('c:\shell32.dll');
  try
    if h <> 0 then
    begin
      Result := TIcon.Create;
// Result.Handle := LoadIcon(h, icon_nr_s);
      Result.Handle := ExtractIcon(application.handle,'c:\windows\system32 \shell32.dll', icon_nr_s);
    end;
  finally
    FreeLibrary(h);
  end;
end;
unter uses bindest du shellapi ein und im Aufruf gibst du eine Zahl als Idendifikation an. Den Pfad für shell32.dll musst du eventuell korridieren.

Viel Spass Rainer
  Mit Zitat antworten Zitat