Retrieving Shell Icons

F

Francesco

Hello,

(sorry, I have already asked this, but it is still unsolved)

I want to display the icons associated with a given extensions
(also parent folder and folder) for my little filemanager in a
virtual list control.

I know, wxMimeTypesManager, unfortunatly, I cannot use it (i need
indexes
beginning from zero for the imagelist, and I'm not able to get
directory icons)

With win32 extension, I didn't come clear also:

The indexes, which i get from:

dwFlags = Globals.SHGFI_USEFILEATTRIBUTES |
Globals.SHGFI_SYSICONINDEX | Globals.SHGFI_SMALLICON |
Globals.SHGFI_ICON
windll.shell32.SHGetFileInfo (item.GetName(),
win32con.FILE_ATTRIBUTE_NORMAL,
byref(Globals.shfileinfo), sizeof(Globals.shfileinfo), dwFlags)
item.m_nIconIdx = Globals.shfileinfo.iIcon

(for example 9 for exe's, 8 html, 7 txt, 4 directories ...)

should correspond to the icons in the list

dwFlags = Globals.SHGFI_USEFILEATTRIBUTES |
Globals.SHGFI_SYSICONINDEX | Globals.SHGFI_SMALLICON
m_hImageList = windll.shell32.SHGetFileInfo('.txt',
win32file.FILE_ATTRIBUTE_NORMAL, byref(Globals.shfileinfo),
sizeof(Globals.shfileinfo), dwFlags)

In wxwindow, it is easy; but in wxPython (?)

Problem is: i get only a int pointer to the iconlist.
Can I transform this, to pass it into the image list; or is there
another solution?

Thank you for any help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top