SHFILEINFO包含一個檔案的信息。
基本介紹
- 中文名:SHFILEINFO
- 作用:包含一個檔案的信息
- szTypeName:檔案的類型名
- hIcon :圖示句柄
簡介
SHFILEINFO
作用:
typedef struct _SHFILEINFO{
HICON hIcon;
int iIcon;
DWORD dwAttributes;
char szDisplayName[MAX_PATH];
char szTypeName[80];
} SHFILEINFO;
Contains information about a file object.
hIcon //圖示句柄
Handle to the icon that represents the file.
iIcon //系統圖示列表的索引
Index of the icon image within the system image list.
dwAttributes //檔案的屬性
Array of values that indicates the attributes of the file object. For information about these values, see the IShellFolder::GetAttributesOf method.
szDisplayName //檔案的路徑等
String that contains the name of the file as it appears in the Windows shell, or the path and file name of the file that contains the icon representing the file.
szTypeName //檔案的類型名
String that describes the type of file.
This structure is used with the SHGetFileInfo function
按實際情況設定dwFileAttributes(資料夾用FILE_ATTRIBUTE_DIRECTORY,其它FILE_ATTRIBUTE_NORMAL)可以大大提高速度。