⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 createiconfromresource.htm

📁 vb的api函数
💻 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>CreateIconFromResource</title>
</head>

<body  background="../../../images/gray_weave.gif"  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"><a name="CreateIconFromResource">CreateIconFromResource</a>, 
    CreateIconFromResourceEx</td>
  </tr>
</table>
</center></div><div align="center"><center>

<table border="1" width="100%" bordercolorlight="#808080" cellspacing="0"
bordercolordark="#FFFFFF">
  <tr>
    <td width="101%" colspan="3">VB声明</td>
  </tr>
  <tr>
    <td width="101%" colspan="3">Declare Function CreateIconFromResource&amp; Lib 
    &quot;user32&quot; (presbits As Byte, ByVal dwResSize As Long, ByVal fIcon As Long, ByVal 
    dwVer As Long)<br>
    Declare Function CreateIconFromResourceEx Lib &quot;user32&quot; (presbits As Byte, ByVal 
    dwResSize As Long, ByVal fIcon As Long, ByVal dwVer As Long, ByVal cxDesired As Long, 
    ByVal cyDesired As Long, ByVal uFlags As Long) As Long</td>
  </tr>
  <tr>
    <td width="101%" colspan="3">说明</td>
  </tr>
  <tr>
    <td width="101%" colspan="3">根据来自一个资源文件的原始数据,创建一个图标或指针</td>
  </tr>
  <tr>
    <td width="101%" colspan="3">返回值</td>
  </tr>
  <tr>
    <td width="101%" colspan="3">Long,返回新建图标或指针的句柄。零表示出错。会设置<a
    href="GetLastError.htm">GetLastError</a></td>
  </tr>
  <tr>
    <td width="101%" colspan="3">参数表</td>
  </tr>
  <tr>
    <td width="25%">参数</td>
    <td width="76%" colspan="2">类型及说明</td>
  </tr>
  <tr>
    <td width="25%">presbits</td>
    <td width="76%" colspan="2">Byte,指定一个缓冲区的头一个字符。该缓冲区包含了原始的资源数据。可变成 
    ByVal As Long,以便传递包含了图标数据的一个内存块的地址</td>
  </tr>
  <tr>
    <td width="25%">dwResSize</td>
    <td width="76%" colspan="2">Long,指定图标数据的长度</td>
  </tr>
  <tr>
    <td width="25%">fIcon</td>
    <td width="76%" colspan="2">Long,TRUE(非零)表示创建一个图标;零创建一个指针</td>
  </tr>
  <tr>
    <td width="25%">dwVer</td>
    <td width="76%" colspan="2">Long,&amp;H20000&amp; 表示创建一个 Windows 2.x 
    图标。&amp;H30000&amp;则创建 Win32 和 Win3.x 图标</td>
  </tr>
  <tr>
    <td width="25%">cxDesired,cyDesired</td>
    <td width="76%" colspan="2">Long,仅适用于 CreateIconFromResourceEx。指定要求的图标或鼠标指针宽度及高度。如设为零,表示使用由 
    <a href="GetSystemMetrics.htm">GetSystemMetrics</a> 函数返回的标准值</td>
  </tr>
  <tr>
    <td width="25%" rowspan="4">uFlags</td>
    <td width="76%" colspan="2">Long,仅适用于 CreateIconFromResourceEx。指定下述某个常数:</td>
  </tr>
  <tr>
    <td width="37%">LR_DEFAULTCOLOR</td>
    <td width="38%">使用对象的默认颜色格式</td>
  </tr>
  <tr>
    <td width="37%">LR_LOADREALSIZE</td>
    <td width="38%">使用在数据流中由数据结构中定义的尺寸</td>
  </tr>
  <tr>
    <td width="37%">LR_MONOCHROME</td>
    <td width="38%">强制对象进入单色模式</td>
  </tr>
  <tr>
    <td width="101%" colspan="3">注解</td>
  </tr>
  <tr>
    <td width="101%" colspan="3"><p align="left">LoadResource 和 LookupIconIdFromDirectoryEx 
    能够获得指向原始资源数据的一个指针</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"><a href="#CreateIconFromResource">Top</a></td>
  </tr>
</table>
</center></div>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -