你好,
以上链接中的内容是关于如何使用ExtractIcon函数和 ExtractIconEx函数从.dll 和.exe 文件获取图标。
ExtractIcon函数从特定的可执行文件、动态连接库或者图像文件获取图标的句柄,其语法如下:
HICON ExtractIcon(
_Reserved_ HINSTANCE hInst,
_In_ LPCTSTR lpszExeFileName,
UINT nIconIndex
);
ExtractIconEx函数为获取的图标句柄创建一个句柄数组,其语法如下:
UINT ExtractIconEx(
_In_ LPCTSTR lpszFile,
_In_ int nIconIndex,
_Out_ HICON *phiconLarge,
_Out_ HICON *phiconSmall,
UINT nIcons
);
一种快捷访问便是在Visual Studio中单击“文件”,“打开文件”,输入文件路径,便可看到下图所示:
选中“100”就看到“运行”的图标:
如果有需要,请参看下面的链接提供的其他方法:
感谢你的支持。
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.