网站首页  词典首页

请输入您要查询的函数:

 

术语 extracticonex
释义 ExtractIconEx
语法:
UINT ExtractIconEx( LPCTSTR lpszFile,
int nIconIndex,
HICON *phiconLarge,
HICON *phiconSmall,
UINT nIcons
);
ExtractIconEx功能
该ExtractIconEx函数创建一个句柄数组从指定的可执行文件,DLL或文件中提取图标大或小图标。
参数
lpszFile
[in]指向一个空结束的字符串指定一个可执行文件,DLL或从该图标文件图标将被提取的名称。
nIconIndex
[in]指定零为基础的第一个图标索引提取。例如,如果该值为0,函数提取指定文件中的第一个图标。
如果该值为-1,phiconLarge和phiconSmall都是NULL,则函数返回指定文件的图标总数。如果该文件是一个可执行文件或DLL,返回值是RT_GROUP_ICON资源数量。如果该文件是一个。ico文件,则返回值为1。
Windows 95/98/Me中,Windows NT 4.0和更高版本:如果该值为负数,要么phiconLarge或phiconSmall不是NULL,函数首先提取的图标,其资源标识符等于nIconIndex绝对值。例如,使用-3提取的图标,其资源标识符为3。
phiconLarge
[out]指向的图标句柄数组接收处理从文件中提取的大图标。如果该参数为NULL,没有大的图标从文件中提取。
phiconSmall
[out]指向的图标句柄数组接收处理从文件中提取的小图标。如果该参数为NULL,不小的图标从文件中提取。
nIcons
[in]指定数目的图标从文件中提取。
返回值
如果nIconIndex参数是-1,phiconLarge参数是NULL,而phiconSmall参数为NULL,则返回值是在指定的文件中包含的图标数目。否则,返回值是多少成功的图标从文件中提取。
备注
此功能不支持图标的16位可执行文件和DLL。
您必须摧毁ExtractIconEx提取DestroyIcon函数调用所有图标。
要检索的大,小图标的尺寸,使用的SM_CXICON,SM_CYICON,SM_CXSMICON和SM_CYSMICON旗帜GetSystemMetrics函数。
在Windows 95/98/Me:ExtractIconExW是支持的Unicode(MSLU)微软层。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
功能信息
最低DLL版本 shell32.dll
在Shellapi.h HeaderDeclared
import libraryShell32.lib
最低操作系统Windows 95,Windows NT 4.0
UnicodeImplemented为ANSI和Unicode版本。
参见
图标概述,DestroyIcon,ExtractIcon
==英文原文==ExtractIconEx Function
The ExtractIconEx function creates an array of handles to large or small icons extracted from the specified executable file, DLL, or icon file.
Syntax
UINT ExtractIconEx( LPCTSTR lpszFile,
int nIconIndex,
HICON *phiconLarge,
HICON *phiconSmall,
UINT nIcons
);
Parameters
lpszFile
[in] Pointer to a null-terminated string specifying the name of an executable file, DLL, or icon file from which icons will be extracted.
nIconIndex
[in] Specifies the zero-based index of the first icon to extract. For example, if this value is zero, the function extracts the first icon in the specified file.
If this value is –1 and phiconLarge and phiconSmall are both NULL, the function returns the total number of icons in the specified file. If the file is an executable file or DLL, the return value is the number of RT_GROUP_ICON resources. If the file is an .ico file, the return value is 1.
Windows 95/98/Me, Windows NT 4.0 and later: If this value is a negative number and either phiconLarge or phiconSmall is not NULL, the function begins by extracting the icon whose resource identifier is equal to the absolute value of nIconIndex. For example, use -3 to extract the icon whose resource identifier is 3.
phiconLarge
[out] Pointer to an array of icon handles that receives handles to the large icons extracted from the file. If this parameter is NULL, no large icons are extracted from the file.
phiconSmall
[out] Pointer to an array of icon handles that receives handles to the small icons extracted from the file. If this parameter is NULL, no small icons are extracted from the file.
nIcons
[in] Specifies the number of icons to extract from the file.
Return Value
If the nIconIndex parameter is -1, the phiconLarge parameter is NULL, and the phiconSmall parameter is NULL, then the return value is the number of icons contained in the specified file. Otherwise, the return value is the number of icons successfully extracted from the file.
Remarks
This function is not supported for icons in 16-bit executables and DLLs.
You must destroy all icons extracted by ExtractIconEx by calling the DestroyIcon function.
To retrieve the dimensions of the large and small icons, use the GetSystemMetrics function with the SM_CXICON, SM_CYICON, SM_CXSMICON, and SM_CYSMICON flags.
Windows 95/98/Me: ExtractIconExW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .
Function Information
Minimum DLL Versionshell32.dll
HeaderDeclared in Shellapi.h
Import libraryShell32.lib
Minimum operating systemsWindows 95, Windows NT 4.0
UnicodeImplemented as ANSI and Unicode versions.
See Also
Icons Overview , DestroyIcon , ExtractIcon
==原始网址==http://msdn.microsoft.com/en-us/library/ms648069(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:26:55