Retrieving Shell Icons

Discussion in 'Python' started by Francesco, Feb 18, 2004.

  1. Francesco

    Francesco Guest

    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!

    --
    Francesco
    Francesco, Feb 18, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    5,653
    Jonathan Bromley
    Feb 18, 2005
  2. Richie Williams
    Replies:
    5
    Views:
    1,493
    Richie Williams
    Oct 25, 2007
  3. Christian Heimes
    Replies:
    0
    Views:
    584
    Christian Heimes
    Feb 27, 2008
  4. Gerardo Herzig
    Replies:
    1
    Views:
    1,058
    Philipp Pagel
    Feb 27, 2008
  5. D'Arcy J.M. Cain
    Replies:
    0
    Views:
    844
    D'Arcy J.M. Cain
    Feb 27, 2008
Loading...

Share This Page