[VB6] ExtractAssociatedIcon: Hoe een 16x16 icon van maken?

Pagina: 1
Acties:

  • Battle Bunny
  • Registratie: Oktober 2001
  • Laatst online: 02-02 21:41
Howdy!

Zojuist heb ik een boel sites door gebanjerd opzoek naar een oplossing voor dit simpele probleem: ExtractAssociatedIcon geeft een 32x32pixel groot icon terug. Als je die vervolgens in een Image List prakt (die op 16x16 staat) krijg je een super brak icon. Is hier een workaround voor? Ik weet dat DrawIcon kan resizen, maar dat ziet er zeer slecht uit....

  • glashio
  • Registratie: Oktober 2001
  • Laatst online: 14-08 08:20

glashio

C64 > AMIGA > PC

Prak hem dan in een "Temporary 32x32" Imagelist ...

> Google Certified Searcher
> Make users so committed to Google that it would be painful to leave
> C64 Gospel
> [SjoQ] = SjoQing


Verwijderd

Ik heb dit gevonden voor je:
ExtratAssociatedIcon allows you to extract only default icon. To extract icon you want use ExtractIconEx, this function allows you to extract both small and large icons of any icon index. what ExtratAssociatedIcon does is it looks up in registry according to the file extension, finds default icon index and target icon file and then loads icon. The problem is it loads icon of default size. If you want to load both small and large icon you must do the following. First extract file etension. Say you have file document.doc file extension is ".doc" Look into registry under HKEY_CLASSES_ROOT\.doc. Read this key default value. On my computer it is "Word.Document.6". Now look the key HKEY_CLASSES_ROOT\Word.Document.6. It has subkey "DefaultIcon" which default value is full path to the file containing the icon foolowed by icon idex separated by comma. You can read this infornation and knowing file and icon index extract both large and small icon with ExtractIconEx.
Daar hoort deze url bij: MSDN Microsoft

Hoop dat het helpt.

  • Battle Bunny
  • Registratie: Oktober 2001
  • Laatst online: 02-02 21:41
Prak hem dan in een "Temporary 32x32" Imagelist ...
Dit KAN wel, maar dan krijg je nog steeds last van die resize meuk. Een 32x32 icon resizen naar 16x16 ziet er erg slecht uit. Daar gaat dit allemaal om.
Ik heb dit gevonden voor je:
Is een mogenlijkheid, maar erg omslachtig... Jammer. Ik ga even prutsen :P