网站首页  词典首页

请输入您要查询的函数:

 

术语 extractassociatedicon
释义 ExtractAssociatedIcon
语法:
HICON ExtractAssociatedIcon( HINSTANCE hInst,
LPTSTR lpIconPath,
LPWORD lpiIcon
);
ExtractAssociatedIcon功能
该ExtractAssociatedIcon函数返回的句柄索引图标在文件中找到或图标在一个关联的可执行文件中找到。
参数
hInst
[in]指定调用的函数的应用实例。
lpIconPath
[in]指向一个字符串,指定完整路径和文件的文件包含图标的名称。函数提取图标处理该文件,或从一个可执行文件与该文件相关联。如果该图标句柄是从一个可执行文件,存储功能的完整路径和文件,在可执行文件的名称字符串指向的lpIconPath。
lpiIcon
[中,out]指向一个WORD,指定图标的句柄指标来获得。如果图标句柄是由一个可执行文件获取,存储功能,在Word图标的标识符指向lpiIcon。
返回值
如果函数成功,返回值是一个图标句柄。如果该图标是由一个相关的可执行文件中提取,存储功能的完整路径和文件字符串中的可执行文件的名称所指向的lpIconPath,并在Word商店图标的标识符指向lpiIcon。
如果函数失败,返回值为NULL。
备注
您必须去摧毁的图标处理ExtractAssociatedIcon返回调用DestroyIcon函数。
在ExtractAssociatedIcon函数首先查找由lpIconPath在指定的文件索引图标。如果该函数不能获得图标处理的文件,该文件都有一个关联的可执行文件,它看起来就是一图标的可执行文件。协会的可执行文件是基于文件扩展名,存储在每个用户的注册表的一部分,可以被定义使用文件管理器的副指挥。
功能信息
最低DLL版本 shell32.dll
在Shellapi.h HeaderDeclared
import libraryShell32.lib
最低操作系统Windows 95,Windows NT 3.5
UnicodeImplemented的ANSI版本。
参见
图标概述,ExtractIcon
==英文原文==ExtractAssociatedIcon Function
The ExtractAssociatedIcon function returns a handle to an indexed icon found in a file or an icon found in an associated executable file.
Syntax
HICON ExtractAssociatedIcon( HINSTANCE hInst,
LPTSTR lpIconPath,
LPWORD lpiIcon
);
Parameters
hInst
[in] Specifies the instance of the application calling the function.
lpIconPath
[in] Pointer to a string that specifies the full path and file name of the file that contains the icon. The function extracts the icon handle from that file, or from an executable file associated with that file. If the icon handle is obtained from an executable file, the function stores the full path and file name of that executable in the string pointed to by lpIconPath.
lpiIcon
[in, out] Pointer to a WORD that specifies the index of the icon whose handle is to be obtained. If the icon handle is obtained from an executable file, the function stores the icon's identifier in the WORD pointed to by lpiIcon.
Return Value
If the function succeeds, the return value is an icon handle. If the icon is extracted from an associated executable file, the function stores the full path and file name of the executable file in the string pointed to by lpIconPath, and stores the icon's identifier in the WORD pointed to by lpiIcon.
If the function fails, the return value is NULL.
Remarks
You must destroy the icon handle returned by ExtractAssociatedIcon by calling the DestroyIcon function.
The ExtractAssociatedIcon function first looks for the indexed icon in the file specified by lpIconPath. If the function cannot obtain the icon handle from that file, and the file has an associated executable file, it looks in that executable file for an icon. Associations with executable files are based on file name extensions, are stored in the per-user part of the registry, and can be defined using File Manager's Associate command.
Function Information
Minimum DLL Versionshell32.dll
HeaderDeclared in Shellapi.h
Import libraryShell32.lib
Minimum operating systemsWindows 95, Windows NT 3.5
UnicodeImplemented as ANSI version.
See Also
Icons Overview , ExtractIcon
==原始网址==http://msdn.microsoft.com/en-us/library/ms648067(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:24:22