Dynamic Menus
Posted: Thu Aug 25, 2005 8:02 pm
ok with a program i was writing for school, i needed a way to keep track of a list of items i was working with, put that list into a menu, and be abe to retrieve the text and have a DEFAULT action for each item added. so here is a snippet of code that allows you to
1) get a menuitems text
2) shows a SIMPLE example of using an INI file to retrieve items and then add them to a popup menu
3) shows how to use the DEFAULT case in the eventmenuid() to perform a generic action. i.e. runprogram(getmenutext(hmenu,eventmenuid()))
http://www.penguinbyte.com/apps/pbwebst ... c_Menu.zip
not my finest work, but perhaps very useful to someone who had absolutely no clue about this like i did until now.
1) get a menuitems text
2) shows a SIMPLE example of using an INI file to retrieve items and then add them to a popup menu
3) shows how to use the DEFAULT case in the eventmenuid() to perform a generic action. i.e. runprogram(getmenutext(hmenu,eventmenuid()))
http://www.penguinbyte.com/apps/pbwebst ... c_Menu.zip
not my finest work, but perhaps very useful to someone who had absolutely no clue about this like i did until now.