Как узнать количество иконок в файле (*.exe, *.dll)?
procedure TForm1.FormCreate(Sender: TObject);
const
//path = 'calc.exe';
//path = 'notepad.exe';
//path = 'mspaint.exe';
path = 'shell32.dll';
var
hi: HICON;
i: integer;
begin
i := 0;
hi := ExtractIcon( HInstance, path, 0 );
while ( hi > 0 ) do
begin
Inc( i );
hi := ExtractIcon( HInstance, path, i );
end;
Caption := IntToStr( i );
end;
|