how to create new menu items in runtime?
Printable View
how to create new menu items in runtime?
I dont think you can create NEW menu items at runtime, but you could do an MRU-type thing, wherein the captions and visibility change, but the code does not.
Can you create a whole bunch of "hidden" menu items that you can enable at run time as you need them?
[edit] - mikewitt - I guess that's what you just suggested! ;)
You need the API's GetMenu, GetSubMenu, and InsertMenuItem. That way you are not limited by the number of invisible menus you create at design time. However, it is not exactly a piece of cake to do, as you then need to subclass to receive the messages from the menus you just created, otherwise they will be useless.
thx, I have solved the problem with VBACCELERATOR menu component (very very goood)
thx , anyway