?? createcompatiblebitmap.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>CreateCompatibleBitmap</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">CreateCompatibleBitmap</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 CreateCompatibleBitmap Lib "gdi32"
Alias "CreateCompatibleBitmap" (ByVal hdc As Long, ByVal nWidth As Long, ByVal
nHeight As Long) As Long</td>
</tr>
<tr>
<td width="100%" colspan="2">說明</td>
</tr>
<tr>
<td width="100%" colspan="2">創(chuàng)建一幅與設(shè)備有關(guān)位圖,它與指定的設(shè)備場景兼容</td>
</tr>
<tr>
<td width="100%" colspan="2">返回值</td>
</tr>
<tr>
<td width="100%" colspan="2">Long,執(zhí)行成功返回位圖句柄,零表示失敗</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%">nWidth</td>
<td width="75%">Long,位圖寬度,以像素為單位</td>
</tr>
<tr>
<td width="25%">nHeight</td>
<td width="75%">Long,位圖高度,以像素為單位</td>
</tr>
<tr>
<td width="100%" colspan="2">注解</td>
</tr>
<tr>
<td width="100%" colspan="2"><p align="left">內(nèi)存設(shè)備場景即與彩色位圖兼容,也與單色位圖兼容。這個函數(shù)的作用是創(chuàng)建一幅與當前選入hdc中的場景兼容。對一個內(nèi)存場景來說,默認的位圖是單色的。倘若內(nèi)存設(shè)備場景有一個DIBSection選入其中,這個函數(shù)就會返回DIBSection的一個句柄。如hdc是一幅設(shè)備位圖,那么結(jié)果生成的位圖就肯定兼容于設(shè)備(也就是說,彩色設(shè)備生成的肯定是彩色位圖)<br>
如果nWidth和nHeight為零,返回的位圖就是一個1×1的單色位圖<br>
一旦位圖不再需要,一定用<a href="DeleteObject.htm" tppabs="http://www.gxbcts.com/airfly/api/papi/DeleteObject.htm">DeleteObject</a>函數(shù)釋放它占用的內(nèi)存及資源</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 + -