如何找到exe文件中32*32图标的索引号,RT_GROUP_ICON??GRPICONDIRENTRY??看到了一篇文章,不知道怎么获取,大侠们帮帮忙

解决方案 »

  1.   

    下个Resource Hacker,打开exe文件,看图标下的序号
    如记事本在图标下的序号8,对应32x32图标
    如计算器在图标下的序号7,对应32x32图标
      

  2.   

    http://wenku.baidu.com/view/6a6523868762caaedd33d4eb.html
    加载GT_GROUP_ICON资源,然后遍历GRPICONDIRENTRY中每一个图标的大小,色深,找到这个图标的索引怎么弄。
      

  3.   

    用這個試試:
    var
      aIcon :TIcon;
      FileName :string;
    begin
      FileName := 'c:\Myexe.exe';
      aIcon := TIcon.Create;
      try
        aIcon.ReleaseHandle;
        aIcon.Handle := ExtractIcon(HInstance, PChar(FileName), 0);
        aIcon.SaveToFile('c:\test.ico');
      finally
        aIcon.Free;
      end;
    end;
      

  4.   

    var
     i: Integer;
     Large, Small: HICON;
     nIcons: Integer;
    begin
      nIcons:=ExtractIconEx(PChar(FileName), -1, Large, Small, 1);
      for i:=0 to nIcons-1 do
      begin
       //...
      end;
    end;