|
-
May 4th, 2002, 01:46 AM
#1
Thread Starter
Hyperactive Member
extract icons to flexgrid
I'm using the following API to pull icons from dll's and put them in a flexgrid. I want to insert the item into a cell in the flexgrid, and thought some db experts might have encountered this before. Any ideas?
Thanks.
Private Type SHFILEINFO
hIcon As Long
iIcon As Long
dwAttributes As Long
szDisplayName As String * 260
szTypeName As String * 80
End Type
Private Declare Function SHGetFileInfo Lib "shell32.dll" Alias "SHGetFileInfoA" _
(ByVal pszPath As String, ByVal dwFileAttributes As Long, psfi As SHFILEINFO, _
ByVal cbSizeFileInfo As Long, ByVal uFlags As Long) As Long
Private Declare Function ImageList_Draw Lib "comctl32.dll" _
(ByVal himl&, ByVal i&, ByVal hDCDest&, ByVal x&, ByVal y&, ByVal flags&) As Long
Private Sub Form_Load()
Dim m As Long, ShInfo As SHFILEINFO
m = SHGetFileInfo("C:\aim\aim.exe", 0&, ShInfo, Len(ShInfo), &H4000 Or &H1)
If m <> 0 Then
Picture1.AutoRedraw = True
Call ImageList_Draw(m, ShInfo.iIcon, Picture1.hdc, 0, 0, &H1)
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|