Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #10  
Antiguo 21-04-2009
jconnor82 jconnor82 is offline
Miembro
 
Registrado: feb 2008
Posts: 22
Poder: 0
jconnor82 Va por buen camino
Al parecer el problema es con la clase TIcon, sus dimensiones no superan la 32x32 o almenos no veo formar de cambiar ese limite, pero si se trabaja directamente con HICON no hay problema

Código Delphi [-]
function GetFile48hIcon(const FileName: string; IconIndex: Integer = 0): HICON;
var
  DeskTopISF: IShellFolder;
  IExIcon: IExtractIcon;
  PathPidl: PItemIDList;
  hIconL, hIconS: HIcon;
begin
  Result := 0;
  if SHGetDesktopFolder(DeskTopISF) <> NOERROR then
    Exit;

  PathPidl := nil;
  if DeskTopISF.GetUIObjectOf(0, 1, PathPidl, IID_IExtractIconA,
    nil, IExIcon) <> NOERROR then
    Exit;

  if (IExIcon.Extract(PChar(FileName), IconIndex, hIconL, hIconS,
    48 or (16 shl 16)) = NOERROR) and (hIconL <> 0) then
    Result := hIconL;

  DestroyIcon(hIconS);
end;

solo quedaria agregar la siguiente funcion:

Código Delphi [-]
procedure AddIconFile48hToImageList(const FileName: string; IconIndex: Integer;
  const ImageList: TImageList);
var
  IconLarge: HICON;
begin
  IconLarge := GetFile48hIcon(FileName, IconIndex);
  if 0 < IconLarge then
  begin
    ImageList_AddIcon(ImageList.Handle, IconLarge);
    DestroyIcon(IconLarge);
  end;
end;

Webs de referencia:
DelphiZeus
HILPERS

Última edición por jconnor82 fecha: 21-04-2009 a las 02:31:05.
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

Temas Similares
Tema Autor Foro Respuestas Último mensaje
ToolBar Paulao Varios 5 14-10-2008 22:47:49
Ayuda con ToolBar ManuelPerez Varios 0 05-03-2008 12:53:57
toolbar ercrizeporta Varios 3 17-09-2007 18:10:52
Problema con un toolbar mavm03 C++ Builder 6 02-10-2006 17:57:02
mover una toolbar Javi2 Varios 2 25-02-2005 18:56:57


La franja horaria es GMT +2. Ahora son las 07:47:16.


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