HICon是一个图标的指针,是一个整数,或者说是句柄
ticon是一个类,类里面的handle就是hicon类型的
eg:
var
 a:HIcon;
 t:TIcon;
Begin
 t:=TIcon.Create;
 t.LoadFromFile(....);//your file here
 a:=t.Handle;
 ....
end;
End;
understand now?

解决方案 »

  1.   

    多谢!不知道你们看不看《Delphi5开发人员指南》,在P458页上倒数第二行的
    ImageIndex:=ImageList_AddIcon(ImageList.Handle,HAppIcon);
    请问:函数ImageList_AddIcon在哪儿定义的?我怎么找不着呢?
      

  2.   

    多谢!不知道你们看不看《Delphi5开发人员指南》,在P458页上倒数第二行的
    ImageIndex:=ImageList_AddIcon(ImageList.Handle,HAppIcon);
    请问:函数ImageList_AddIcon在哪儿定义的?我怎么找不着呢?
      

  3.   

    是windows API
    ImageList_AddIcon
    int ImageList_AddIcon(
        HIMAGELIST himl,
        HICON hicon
       ); Adds an icon or cursor to an image list. ImageList_AddIcon calls the ImageList_ReplaceIcon function. Returns the index of the new image if successful, or -1 otherwise. 
    himl 
    Handle to the image list. If this parameter identifies a masked image list, the macro copies both the image and mask bitmaps of the icon or cursor. If this parameter identifies a nonmasked image list, the macro copies only the image bitmap. 
    hicon 
    Handle to the icon or cursor that contains the bitmap and mask for the new image. 
    Because the system does not save hicon, you can destroy it after the macro returns if the icon or cursor was created by theCreateIcon function. You do not need to destroy hicon if it was loaded by theLoadIcon function; the system automatically frees an icon resource when it is no longer needed. The ImageList_AddIcon macro is defined as follows: #define  ImageList_AddIcon(himl, hicon) ImageList_ReplaceIcon(himl, -1, hicon)
     
      

  4.   

    请问需要uses什么单元才可用呢?
      

  5.   

    如果只是一般的WINAPI,把鼠标移到该函数上方,按住CTRL健不放(这时会出现下划线),单击可到函数申明处。