📄 extractassociatedicon.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<style><!--
body,table {font-family:"宋体"; font-size: 9pt; line-height:11pt;}
a {text-decoration:none} a:hover {color:red;text-decoration:underline}
--></style>
<title>ExtractAssociatedIcon</title>
</head>
<body link="#FF0000" vlink="#FF0000" alink="#FF0000" bgcolor="#FFC8C8">
<div align="center"><center>
<table border="0" width="100%" height="22" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="16">ExtractAssociatedIcon</td>
</tr>
</table>
</center></div><div align="center"><center>
<table border="1" width="100%" bordercolorlight="#808080" cellspacing="0"
bordercolordark="#FFFFFF">
<tr>
<td width="100%" colspan="2">VB声明</td>
</tr>
<tr>
<td width="100%" colspan="2">Declare Function ExtractAssociatedIcon Lib
"shell32.dll" Alias "ExtractAssociateIconA" (ByVal hInst As Long,
ByVal lpIconPath As String, lpiIcon As Long) As Long</td>
</tr>
<tr>
<td width="100%" colspan="2">说明</td>
</tr>
<tr>
<td width="100%" colspan="2">这个函数可判断一个可执行程序或DLL中是否存在图标,或是否有图标与系统注册表中指定的文件存在关联。随后,它允许我们提取出那些图标</td>
</tr>
<tr>
<td width="100%" colspan="2">返回值</td>
</tr>
<tr>
<td width="100%" colspan="2">Long,如果找到任何图标,就返回图标的句柄;否则返回零</td>
</tr>
<tr>
<td width="100%" colspan="2">参数表</td>
</tr>
<tr>
<td width="25%">参数</td>
<td width="75%">类型及说明</td>
</tr>
<tr>
<td width="25%">hInst</td>
<td width="75%">Long,当前应用程序的实例句柄。也可用<a
href="GetWindowWord.htm" tppabs="http://personal.hb.cninfo.net/~vbapi/GetWindowWord.htm">GetWindowWord</a>函数取得拥有一个窗体或控件的示例的句柄</td>
</tr>
<tr>
<td width="25%">lpIconPath</td>
<td width="75%">String,指定一个文件名,准备从该文件中提取图标。如果文件并非执行程序或DLL本身,但通过系统注册表与一个可执行文件关联,就用这个字串装载可执行程序的名字</td>
</tr>
<tr>
<td width="25%">lpiIcon</td>
<td width="75%">Long,在其中装载图标在可执行文件中的资源标识符</td>
</tr>
<tr>
<td width="100%" colspan="2">注解</td>
</tr>
<tr>
<td width="100%" colspan="2"><p align="left">注意至少要把lpIconPath字串定义成MAX_PATH个字符的长度</td>
</tr>
</table>
</center></div><div align="center"><center>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><p align="right">Top</td>
</tr>
</table>
</center></div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -