Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Showmenu (based on files => ShowMenuStringFromFilesInFolder)
This question is also related to the function "ShowMenuStringFromFilesInFolder"  this topic:

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

Forum Jump:

Users browsing this thread: 1 Guest(s)