关于文件的图标 SHGetFileInfo可以取得"*.rm"类型文件的图标,只是需要设置函数的一个参数,你看一下MSDN,如果还有问题,给我Email:[email protected],我给你一个例子。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用FileFind找到一个扩展名是你想要的文件类型,然后处理知。。 谢谢sungang(),使用SHGFI_USEFILEATTRIBUTES属性即可。给分。 to sungang(),注册密码错误,暂时不能给分。找到密码后一定给分,决不失言 HOWTO: Retrieve an Icon for a File Class Without a File ID: Q179167 --------------------------------------------------------------------------------The information in this article applies to:Microsoft Win32 Application Programming Interface (API)--------------------------------------------------------------------------------SUMMARYThis article explains how to use the SHGetFileInfo API to retrieve the icon for a file class without having a specific file of that class available. MORE INFORMATIONTo do this, select the SHGFI_USEFILEATTRIBUTES flag and FILE_ATTRIBUTE_NORMAL so that the API assumes that the file exists and it will not try to look for it on disk. For example, to find the icon associated with ".zip" files the call would look like: SHFILEINFO sfi; HIMAGELIST hil; ZeroMemory(&sfi,sizeof(sfi)); hil = SHGetFileInfo(".zip", FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(sfi), SHGFI_USEFILEATTRIBUTES|SHGFI_ICON); // hil now contains the handle to the system image list // containing the large icon images. // sfi.hIcon contains the large icon for the file. REFERENCESAdditional query words: Keywords : kbLib kbNTOS400 kbWinOS2000 kbWinOS95 kbWinOS98 kbGrpShell Version : winnt: Platform : winnt Issue type : kbhowto Technology : kbvcSearch Last Reviewed: August 17, 2000© 2000 Microsoft Corporation. All rights reserved. Terms of Use. --------------------------------------------------------------------------------Send feedback to MSDN.Look here for MSDN Online resources 位图双缓冲问题 VC 人事管理系统 往资源中导入图片,运行提示:图片是大于256色的,无法显示的问题? 急救!!!!关于CEDIT的问题 请问如何知道一个IP地址的服务器是否有DNS、SMTP、POP、FTP、WEB等服务? 关于构造函数的问题!!! 有用UC聊天的朋友请加入CSDN-VC组!或者进来留个UC号吧! 如何在主窗口体现子窗口的数据 请教vc++中调用matlab函数问题 如何注册系统热键 Like "A" 谁有iphlpapi.h? where down? 请问"mstcpip.h","iphlpapi.h"这两个头文件怎么不能包括啊?
ID: Q179167
--------------------------------------------------------------------------------
The information in this article applies to:Microsoft Win32 Application Programming Interface (API)--------------------------------------------------------------------------------
SUMMARY
This article explains how to use the SHGetFileInfo API to retrieve the icon for a file class without having a specific file of that class available. MORE INFORMATION
To do this, select the SHGFI_USEFILEATTRIBUTES flag and FILE_ATTRIBUTE_NORMAL so that the API assumes that the file exists and it will not try to look for it on disk. For example, to find the icon associated with ".zip" files the call would look like:
SHFILEINFO sfi;
HIMAGELIST hil; ZeroMemory(&sfi,sizeof(sfi));
hil = SHGetFileInfo(".zip",
FILE_ATTRIBUTE_NORMAL,
&sfi,
sizeof(sfi),
SHGFI_USEFILEATTRIBUTES|SHGFI_ICON); // hil now contains the handle to the system image list
// containing the large icon images.
// sfi.hIcon contains the large icon for the file. REFERENCESAdditional query words: Keywords : kbLib kbNTOS400 kbWinOS2000 kbWinOS95 kbWinOS98 kbGrpShell
Version : winnt:
Platform : winnt
Issue type : kbhowto
Technology : kbvcSearch
Last Reviewed: August 17, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.
--------------------------------------------------------------------------------
Send feedback to MSDN.Look here for MSDN Online resources