?? gettextextentexpoint.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>GetTextExtentExPoint</title>
</head>
<body link="#FF0000" vlink="#FF0000" alink="#FF0000" bgcolor=#E2DEE9>
<div align="center"><center>
<table border="0" width="100%" height="22" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="16">GetTextExtentExPoint</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 GetTextExtentExPoint Lib "gdi32"
Alias "GetTextExtentExPointA" (ByVal hdc As Long, ByVal lpszStr As String, ByVal
cchString As Long, ByVal nMaxExtent As Long, lpnFit As Long, alpDx As Long, lpSize As
SIZE) As Long</td>
</tr>
<tr>
<td width="100%" colspan="2">說明</td>
</tr>
<tr>
<td width="100%" colspan="2">判斷要填入指定區(qū)域的字符數(shù)量。也用一個數(shù)組裝載每個字符的范圍信息</td>
</tr>
<tr>
<td width="100%" colspan="2">返回值</td>
</tr>
<tr>
<td width="100%" colspan="2">Long,非零表示成功,零表示失敗。會設(shè)置<a
href="GetLastError.htm" tppabs="http://www.gxbcts.com/airfly/api/papi/GetLastError.htm">GetLastError</a></td>
</tr>
<tr>
<td width="100%" colspan="2">參數(shù)表</td>
</tr>
<tr>
<td width="25%">參數(shù)</td>
<td width="75%">類型及說明</td>
</tr>
<tr>
<td width="25%">hdc</td>
<td width="75%">Long,設(shè)備場景的句柄</td>
</tr>
<tr>
<td width="25%">lpszStr</td>
<td width="75%">String,準(zhǔn)備量度其范圍的字串</td>
</tr>
<tr>
<td width="25%">cchString</td>
<td width="75%">Long,lpszStr字串的長度</td>
</tr>
<tr>
<td width="25%">nMaxExtent</td>
<td width="75%">Long,采用邏輯單位表示的水平范圍</td>
</tr>
<tr>
<td width="25%">lpnFit</td>
<td width="75%">Long,在其中保存欲填充到指定區(qū)域的字符數(shù)量。可以為NULL(用一個別名化的聲明來設(shè)置ByVal
As Long)——此時會忽略nMaxExtent設(shè)置</td>
</tr>
<tr>
<td width="25%">As</td>
<td width="75%">Long,cchString數(shù)組的第一個條目。每個條目都要保存從字串起點(diǎn)到這個字符的距離(采用邏輯單位)。如果不需要這方面的信息,也可設(shè)為NULL(用別名聲明設(shè)置
ByVal As Long)</td>
</tr>
<tr>
<td width="25%">lpSize</td>
<td width="75%">SIZE,這個結(jié)構(gòu)用于裝載字串范圍的高度和寬度信息</td>
</tr>
<tr>
<td width="100%" colspan="2">注解</td>
</tr>
<tr>
<td width="100%" colspan="2"><p align="left">可用這個函數(shù)計(jì)算自動換行輸出時的字符位置</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>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -