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

📄 getcurrencyformat.htm

📁 WinAPI函数打包下载.rar
💻 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>GetCurrencyFormat</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"><a name="GetCurrencyFormat, GetCurrencyFormatBynum">GetCurrencyFormat, 
    GetCurrencyFormatBynum</a></td>
  </tr>
</table>
</center></div><div align="center"><center>

<table border="1" width="100%" bordercolorlight="#808080" cellspacing="0"
bordercolordark="#FFFFFF">
  <tr>
    <td width="102%" colspan="2">VB声明</td>
  </tr>
  <tr>
    <td width="102%" colspan="2">Declare Function GetCurrencyFormat&amp; Lib 
    &quot;kernel32&quot; Alias &quot;GetCurrencyFormatA&quot; (ByVal Locale As Long, ByVal 
    dwFlags As Long, ByVal lpValue As String, lpFormat As CURRENCYFMT, ByVal lpCurrencyStr As 
    String, ByVal cchCurrency As Long)<br>
    Declare Function GetCurrencyFormatBynum&amp; Lib &quot;kernel32&quot; Alias 
    &quot;GetCurrencyFormatA&quot; (ByVal Locale As Long, ByVal dwFlags As Long, ByVal lpValue 
    As String, ByVal lpFormat As Long, ByVal lpCurrencyStr As String, ByVal cchCurrency As 
    Long)</td>
  </tr>
  <tr>
    <td width="102%" colspan="2">说明</td>
  </tr>
  <tr>
    <td width="102%" colspan="2">针对指定的“地方”设置,根据货币格式格式化一个数字</td>
  </tr>
  <tr>
    <td width="102%" colspan="2">返回值</td>
  </tr>
  <tr>
    <td width="102%" colspan="2">Long,格式化过后的字串的长度。零表示出错。会将<a
    href="GetLastError.htm" tppabs="http://personal.hb.cninfo.net/~vbapi/GetLastError.htm">GetLastError</a>设置为下述值之一:ERROR_INSUFFICIENT_BUFFER,ERROR_INVALID_FLAGS,ERROR_INVALID_PARAMETER</td>
  </tr>
  <tr>
    <td width="102%" colspan="2">参数表</td>
  </tr>
  <tr>
    <td width="25%">参数</td>
    <td width="77%">类型及说明</td>
  </tr>
  <tr>
    <td width="25%">Locale</td>
    <td width="77%">Long,用于决定格式的地方ID。lpFormat参数中指定的任何信息(倘若不是NULL)都优先于特定于地方的信息</td>
  </tr>
  <tr>
    <td width="25%">dwFlags</td>
    <td width="77%">Long,如指定了lpFormat,那么该参数应该为零。否则,可设为LOCALE_NOUSEROVERRIDE,强制使用系统地方参数——即使它们已由用户取代</td>
  </tr>
  <tr>
    <td width="25%">lpValue</td>
    <td width="77%">String,指定欲格式化的数字。可以只有数位、一个前缀“-”号以及一个小数点</td>
  </tr>
  <tr>
    <td width="25%">lpFormat</td>
    <td width="77%">CURRENCYFMT,可设为NULL,使用特定于不同地方的值(用<a
    name="GetCurrencyFormat, GetCurrencyFormatBynum">GetCurrencyFormatBynum</a>,则可通过ByVal 
    As Long形式传递这个参数)。否则,可引用一个CURRENCYFMT结构,其中包含所有必要的字段,可填入需要用到的信息</td>
  </tr>
  <tr>
    <td width="25%">lpCurrencyStr</td>
    <td width="77%">String,指定一个缓冲区,用于容纳格式化过后的字串。注意事先对字串进行初始化</td>
  </tr>
  <tr>
    <td width="25%">cchCurrency</td>
    <td width="77%">Long,lpCurrencyStr缓冲区的长度。如为零,表示函数会返回需要缓冲区的大小</td>
  </tr>
  <tr>
    <td width="102%" colspan="2">注解</td>
  </tr>
  <tr>
    <td width="102%" colspan="2"><p align="left">在vb里,如使用一个别名,其中的lpFormat设为NULL,则可以正常使用。CURRENCYFMT结构的正确预初始化非常具有挑战性</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="#GetCurrencyFormat, GetCurrencyFormatBynum">Top</a></td>
  </tr>
</table>
</center></div>
</body>
</html>

⌨️ 快捷键说明

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