Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Showmenu (based on files => ShowMenuStringFromFilesInFolder)
#1
This question is also related to the function "ShowMenuStringFromFilesInFolder"  this topic:
http://www.quickmacros.com/forum/showthr...p?tid=5110

Is it possible to render the file icons that are rendered use the above function?

I can render preset icons (SetThreadMenuIcons), but how do you render icons based on the file-type that is beeing rendered?
I think I solved it some time ago but I can not find it in my qm items after a extensive search.
I also can not find the topic regarding this question as I or someone else might have asked it in the past.

If there is a way, I would really appreciate it. But again if this is a complex request then skip it.

Thanks anyway.
#2
i think this is what your after ron
Code:
Copy      Help
str sm; ARRAY(str) a
ShowMenuStringFromFilesInFolder "$documents$\*.txt" sm a
__ImageList- il
;il.Load("bmp file created with qm imagelist editor")
;or
il=ImageList_Create(16 16 ILC_MASK|ILC_COLOR32 0 8)
int hi
hi=GetFileIcon(".txt")
ImageList_ReplaceIcon(il -1 hi)
DestroyIcon(hi)
int ii; str stmi;
for ii 1 a.len+1
,stmi.formata("%i=0 " ii)
stmi.trim
SetThreadMenuIcons stmi +il 2
int i=ShowMenu(sm)-1; if(i<0) ret
out a[i]
#3
Thank you!!!


Forum Jump:


Users browsing this thread: 1 Guest(s)