'PictDesc与Guid分别指的是什么,有详细的资料不?
Private Function BitmapToPicture(ByVal hBmp As Long) As StdPicture
Dim oNewPic As Picture, tPicConv As PictDesc, IGuid As Guid
'PictDesc与Guid分别指的是什么,有详细的资料不?
With tPicConv
.cbSizeofStruct = Len(tPicConv)
.PicType = vbPicTypeBitmap
.hImage = hBmp
End With
With IGuid
.Data1 = &H20400
.Data4(0) = &HC0
.Data4(7) = &H46
End With
OleCreatePictureIndirect tPicConv, IGuid, True, oNewPic
Set BitmapToPicture = oNewPic
End Function
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0 To 7) As Byte
End TypePrivate Type PictDesc
cbSizeofStruct As Long
picType As Long
hImage As Long
xExt As Long
yExt As Long
End Type