获得文件ICON API

获得文件ICON Windows API

Get files icon
//-------------------------------//
{
  Function:
    Get files icon
  Parameter:
    Filename: File path which icon will been gotten
    SmallIcon: If true will get 16*16 size icon, false will get 32*32 size icon
  Return value:
    Icon's handle
  Example:
    frmTest.Icon.Handle := GetFileIcon('d:\test.doc', true);
    image1.Picture.Icon.Handle := GetFileIcon('d:\test.doc', false);
}
function GetFileIcon(const Filename: string; SmallIcon: Boolean): HICON;

猜你喜欢

转载自cqling.iteye.com/blog/1002286