Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > API de Windows
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #17  
Antiguo 05-11-2005
[Gunman] [Gunman] is offline
Miembro
 
Registrado: dic 2004
Ubicación: Pedreguer.
Posts: 355
Poder: 22
[Gunman] Va por buen camino
Retiro mi duda
ya lo tengo!
Código:
procedure GetFileIcon(ImageList: TImageList; ListItem: TListItem; Name: String;
   IconSize: TIconSize);
 var
   FInfo: TSHFileInfo;
   ImageListHandle: THandle;
 begin
   if IconSize = isLarge then
   ImageListHandle := SHGetFileInfo(PAnsiChar(Name),0,FInfo,SizeOf(TSHFileInfo),
   SHGFI_LARGEICON or SHGFI_SYSICONINDEX or SHGFI_USEFILEATTRIBUTES)
   else
   ImageListHandle := SHGetFileInfo(PAnsiChar(Name),0,FInfo,SizeOf(TSHFileInfo),
   SHGFI_SMALLICON or SHGFI_SYSICONINDEX or SHGFI_USEFILEATTRIBUTES);
 
   SendMessage(ListItem.Owner.Owner.Handle, LVM_SETIMAGELIST, LVSIL_SMALL, ImageListHandle);
 
   SendMessage(ListItem.Owner.Owner.Handle, LVM_SETIMAGELIST, LVSIL_NORMAL, ImageListHandle);
 
   ListItem.ImageIndex := FInfo.iIcon;
 end;
 
 procedure TForm1.Button1Click(Sender: TObject);
 begin
   ListView1.Items.Add.Caption := Edit1.Text;
   GetFileIcon(ImageList1,ListView1.Items.Item[ListView1.Items.Count-1],Edit1.Text,isSmall);
 end;
Este es el código, funciona!
__________________
l2prog.co.nr

Última edición por [Gunman] fecha: 05-11-2005 a las 01:16:57. Razón: Código añadido
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 16:35:31.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi