?? getcurrencyformat.htm
字號(hào):
<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& Lib
"kernel32" Alias "GetCurrencyFormatA" (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& Lib "kernel32" Alias
"GetCurrencyFormatA" (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">針對指定的“地方”設(shè)置,根據(jù)貨幣格式格式化一個(gè)數(shù)字</td>
</tr>
<tr>
<td width="102%" colspan="2">返回值</td>
</tr>
<tr>
<td width="102%" colspan="2">Long,格式化過后的字串的長度。零表示出錯(cuò)。會(huì)將<a
href="GetLastError.htm">GetLastError</a>設(shè)置為下述值之一:ERROR_INSUFFICIENT_BUFFER,ERROR_INVALID_FLAGS,ERROR_INVALID_PARAMETER</td>
</tr>
<tr>
<td width="102%" colspan="2">參數(shù)表</td>
</tr>
<tr>
<td width="25%">參數(shù)</td>
<td width="77%">類型及說明</td>
</tr>
<tr>
<td width="25%">Locale</td>
<td width="77%">Long,用于決定格式的地方ID。lpFormat參數(shù)中指定的任何信息(倘若不是NULL)都優(yōu)先于特定于地方的信息</td>
</tr>
<tr>
<td width="25%">dwFlags</td>
<td width="77%">Long,如指定了lpFormat,那么該參數(shù)應(yīng)該為零。否則,可設(shè)為LOCALE_NOUSEROVERRIDE,強(qiáng)制使用系統(tǒng)地方參數(shù)——即使它們已由用戶取代</td>
</tr>
<tr>
<td width="25%">lpValue</td>
<td width="77%">String,指定欲格式化的數(shù)字??梢灾挥袛?shù)位、一個(gè)前綴“-”號(hào)以及一個(gè)小數(shù)點(diǎn)</td>
</tr>
<tr>
<td width="25%">lpFormat</td>
<td width="77%">CURRENCYFMT,可設(shè)為NULL,使用特定于不同地方的值(用<a
name="GetCurrencyFormat, GetCurrencyFormatBynum">GetCurrencyFormatBynum</a>,則可通過ByVal
As Long形式傳遞這個(gè)參數(shù))。否則,可引用一個(gè)CURRENCYFMT結(jié)構(gòu),其中包含所有必要的字段,可填入需要用到的信息</td>
</tr>
<tr>
<td width="25%">lpCurrencyStr</td>
<td width="77%">String,指定一個(gè)緩沖區(qū),用于容納格式化過后的字串。注意事先對字串進(jìn)行初始化</td>
</tr>
<tr>
<td width="25%">cchCurrency</td>
<td width="77%">Long,lpCurrencyStr緩沖區(qū)的長度。如為零,表示函數(shù)會(huì)返回需要緩沖區(qū)的大小</td>
</tr>
<tr>
<td width="102%" colspan="2">注解</td>
</tr>
<tr>
<td width="102%" colspan="2"><p align="left">在vb里,如使用一個(gè)別名,其中的lpFormat設(shè)為NULL,則可以正常使用。CURRENCYFMT結(jié)構(gòu)的正確預(yù)初始化非常具有挑戰(zhàn)性</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>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -