积极答复者
C++中如何调用C:\Windows\system32\imageres.dll中的图标

问题
答案
-
Please refer:http://www.codeproject.com/Articles/9303/Get-icons-from-Exe-or-DLL-the-PE-way
Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.
- 已建议为答案 Jane Wang - MSFTModerator 2013年8月22日 12:03
- 已标记为答案 Jane Wang - MSFTModerator 2013年8月30日 5:20
-
你好,
以上链接中的内容是关于如何使用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”就看到“运行”的图标:
如果有需要,请参看下面的链接提供的其他方法:
Extract icons from EXE or DLL files
Extracting Icons from EXE/DLL and Icon Manipulation
感谢你的支持。
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
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.- 已编辑 Jane Wang - MSFTModerator 2013年8月22日 13:25 补充
- 已标记为答案 Jane Wang - MSFTModerator 2013年8月26日 0:45
全部回复
-
Please refer:http://www.codeproject.com/Articles/9303/Get-icons-from-Exe-or-DLL-the-PE-way
Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.
- 已建议为答案 Jane Wang - MSFTModerator 2013年8月22日 12:03
- 已标记为答案 Jane Wang - MSFTModerator 2013年8月30日 5:20
-
你好,
以上链接中的内容是关于如何使用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”就看到“运行”的图标:
如果有需要,请参看下面的链接提供的其他方法:
Extract icons from EXE or DLL files
Extracting Icons from EXE/DLL and Icon Manipulation
感谢你的支持。
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
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.- 已编辑 Jane Wang - MSFTModerator 2013年8月22日 13:25 补充
- 已标记为答案 Jane Wang - MSFTModerator 2013年8月26日 0:45
-
你好,
以上链接中的内容是关于如何使用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 );
你能使用这种方法帮我将运行按钮提取出来并显示在一个picTureBox中吗?最好附上代码。你提供的网址中的内容太难了,看不懂
- 已编辑 求知与释疑 2013年8月30日 3:22
-
你好,
请尝试使用LoadLibrary()加载shell32.dll,然后用LoadIcon()获取ICON句柄,接下来使用Icon::FromHandle(), ImageList::Images::Add() 将icon添加到图像列表,最后使用DestroyIcon() 进行清除。
请参看下面链接中的代码样例:
论坛是交流社区,大家在这里一般讨论解决问题的方案,具体代码请自己调试分析。
感谢你的支持。
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
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.