?? createbitmap.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>CreateBitmap</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">CreateBitmap</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 CreateBitmap Lib "gdi32" Alias
"CreateBitmap" (ByVal nWidth As Long, ByVal nHeight As Long, ByVal nPlanes As
Long, ByVal nBitCount As Long, lpBits As Any) As Long</td>
</tr>
<tr>
<td width="100%" colspan="2">說明</td>
</tr>
<tr>
<td width="100%" colspan="2">按照規定的格式創建一幅與設備有關位圖</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%">nWidth</td>
<td width="75%">Long,位圖寬度,以像素為單位</td>
</tr>
<tr>
<td width="25%">nHeight</td>
<td width="75%">Long,位圖高度,以像素為單位</td>
</tr>
<tr>
<td width="25%">nPlanes</td>
<td width="75%">Long,色層數量</td>
</tr>
<tr>
<td width="25%">nBitCount</td>
<td width="75%">Long,每像素的位數</td>
</tr>
<tr>
<td width="25%">lpBits</td>
<td width="75%">Any,指向欲載入位圖的數據的指針。可設為零,表示不對位圖進行初始化(用ByVal傳遞一個零值)。這個數據的格式必須與設備的要求相符。掃描線必須對齊16位字邊界</td>
</tr>
<tr>
<td width="100%" colspan="2">注解</td>
</tr>
<tr>
<td width="100%" colspan="2"><p align="left">一旦不再需要,記住用<a
href="DeleteObject.htm">DeleteObject</a>函數釋放位圖占用的內存和資源<br>
可用這個函數創建單色位圖(1層,每像素一位)。對于彩色位圖,則應使用<a
href="CreateCompatibleBitmap.htm">CreateCompatibleBitmap</a>。這個函數可以勝任工作;但要注意,用它創建的位圖在使用時會稍慢一些,因為Windows每次使用的時候都必須檢查它的位圖格式<br>
如果nWidth和nHeight為零,返回的位圖就是一個1×1的單色位圖</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 + -