I want to convert mDrives(mCt).nIcon to StdPicture in RefreshDriveList sub using OleCreatePictureIndirect.
...can someone help me?Code:Private Declare Function OleCreatePictureIndirect Lib "OLEPRO32.DLL" (lpPictDesc As PICTDESC, riid As Any, ByVal fPictureOwnsHandle As Long, ppRet As IPicture) As Long Private Type PICTDESC Size As Long Type As Long hBmpOrIcon As Long hPal As Long End Type ... Public Sub RefreshDriveList() Dim diskIcon As StdPicture Dim dPict As PICTDESC dPict.Size = Len(dPict) dPict.Type = vbPicTypeIcon ... mDrives(mCt).Name = sName mDrives(mCt).nIcon = GetIconIndex(sDrives(i), SHGFI_SMALLICON) diskIcon = ... End sub




Reply With Quote
