CreateIcon |
VB聲明 |
|
Declare Function CreateIcon Lib "user32" Alias "CreateIcon" (ByVal hInstance As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal nPlanes As Byte, ByVal nBitsPixel As Byte, lpANDbits As Byte, lpXORbits As Byte) As Long |
|
說明 |
|
創(chuàng)建一個(gè)圖標(biāo) |
|
返回值 |
|
Long,執(zhí)行成功返回圖標(biāo)的句柄,零表示失敗。會設(shè)置GetLastError |
|
參數(shù)表 |
|
參數(shù) |
類型及說明 |
hInstance |
Long,準(zhǔn)備擁有圖標(biāo)的應(yīng)用程序的實(shí)例的句柄??捎?a href="getwindowword.htm" class="topiclink">GetWindowWord函數(shù)獲得擁有一個(gè)窗體或控件的一個(gè)實(shí)例的句柄 |
nWidth |
Long,圖標(biāo)圖象的寬度??捎?a href="getsystemmetrics.htm" class="topiclink">GetSystemMetrics函數(shù)判斷一個(gè)特定設(shè)備的正確編號。VGA的編號是32 |
nHeight |
Long,圖標(biāo)圖象的高度??捎?a href="getsystemmetrics.htm" class="topiclink">GetSystemMetrics函數(shù)判斷一個(gè)特定設(shè)備的正確編號。VGA的編號是32 |
nPlanes |
Byte,lpXORbits數(shù)據(jù)數(shù)組中的色層數(shù)量 |
nBitsPixel |
Byte,lpXORbits數(shù)據(jù)數(shù)組中每像素的位數(shù) |
lpANDbits |
Byte,指向AND位圖數(shù)據(jù)的指針 |
lpXORbits |
Byte,指向XOR位圖數(shù)據(jù)的指針 |
注解 |
|
一旦不再需要,注意用DestroyIcon函數(shù)釋放鼠標(biāo)指針占用的內(nèi)存及資源 |
Top |