How can I implement dynamic menus in COOL:Gen?
WinFun offers several functions to manipulate menu items. Each menu and submenu has its own handle. These can be obtained with rnGetMainMenuHandle and rnGetSubMenuHandle. Once you have the handle of a menu or submenu you can operate on its menu items. You can change the caption (and mnemonic) of a menu item and you can delete a menu item. However you cannot add a menu item as it not possible to associate a newly added item with event logic in your action diagram. So if you want to offer a different set of menu options for a different set of users you must create your window with as many items on it as you there are options in total, and associate them with event logic in the normal way. For each user you must decide which items are valid and delete those which are invalid using rnDeleteMenuItem, normally in the window Open event. You can change the caption and meaning of a specific menu item with rnSetMenuCaption. If you do this you will probably want to have an IF statement in the eve