网站首页  词典首页

请输入您要查询的函数:

 

术语 extracticon
释义 ExtractIcon
语法:
HICON ExtractIcon( HINSTANCE hInst,
LPCTSTR lpszExeFileName,
UINT nIconIndex
);
ExtractIcon函数
该ExtractIcon函数检索句柄从指定的可执行文件,DLL或图标文件的图标。
要检索一个句柄数组大或小图标,使用ExtractIconEx功能。
参数
hInst
[in]句柄在调用该函数应用实例。
lpszExeFileName
[in]指向一个空结束的字符串指定一个可执行文件,DLL或图标文件名。
nIconIndex
[in]指定零为基础的图标索引检索。例如,如果此值为0,函数返回的句柄指定文件中的第一个图标。
如果此值为-1,则函数返回指定文件的图标总数。如果该文件是一个可执行文件或DLL,返回值是RT_GROUP_ICON资源数量。如果该文件是一个。ICO文件,则返回值为1。
Windows 95/98/Me中,Windows NT 4.0和更高版本:如果该值为负数不等于-1,则函数返回的句柄指定的文件中的资源标识符等于nIconIndex绝对值图标。例如,您应该使用-3提取的图标,其资源标识符为3。要提取的图标,其资源标识符为1,使用ExtractIconEx功能。
返回值
返回值是一个句柄的图标。如果指定的文件不是一个可执行文件,DLL或图标文件,返回为1。如果没有图标的文件中发现,返回值为NULL。
备注
此功能不支持图标的16位可执行文件和DLL。
您必须去摧毁的图标处理ExtractIcon返回调用DestroyIcon函数。
在Windows 95/98/Me:ExtractIconW是支持的Unicode(MSLU)微软层。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
功能信息
最低DLL版本 shell32.dll
在Shellapi.h HeaderDeclared
import libraryShell32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
图标概述,DestroyIcon
==英文原文==ExtractIcon Function
The ExtractIcon function retrieves a handle to an icon from the specified executable file, DLL, or icon file.
To retrieve an array of handles to large or small icons, use the ExtractIconEx function.
Syntax
HICON ExtractIcon( HINSTANCE hInst,
LPCTSTR lpszExeFileName,
UINT nIconIndex
);
Parameters
hInst
[in] Handle to the instance of the application calling the function.
lpszExeFileName
[in] Pointer to a null-terminated string specifying the name of an executable file, DLL, or icon file.
nIconIndex
[in] Specifies the zero-based index of the icon to retrieve. For example, if this value is 0, the function returns a handle to the first icon in the specified file.
If this value is -1, 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 not equal to –1, the function returns a handle to the icon in the specified file whose resource identifier is equal to the absolute value of nIconIndex. For example, you should use –3 to extract the icon whose resource identifier is 3. To extract the icon whose resource identifier is 1, use the ExtractIconEx function.
Return Value
The return value is a handle to an icon. If the file specified was not an executable file, DLL, or icon file, the return is 1. If no icons were found in the file, the return value is NULL.
Remarks
This function is not supported for icons in 16-bit executables and DLLs.
You must destroy the icon handle returned by ExtractIcon by calling the DestroyIcon function.
Windows 95/98/Me: ExtractIconW 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 3.1
UnicodeImplemented as ANSI and Unicode versions.
See Also
Icons Overview , DestroyIcon
==原始网址==http://msdn.microsoft.com/en-us/library/ms648068(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:32:19