Is it possible to add menuitems during runtime using commands at runtime.
If possible what is the function I should use to do so.
Any response is greatly appreciated.
Emus21
Printable View
Is it possible to add menuitems during runtime using commands at runtime.
If possible what is the function I should use to do so.
Any response is greatly appreciated.
Emus21
Add an item with InsertMenuItem() and delete them with DeleteMenu(). Useful API routines to consider when playing with this stuff are, GetMenu() and GetSubMenu() to get handles, EnableMenuItem() enables or disables items and if you want to get deep into it, you can use GetMenuItemInfo() and SetMenuItemInfo() to do several modifcations at the same time.
Thanks much, I'll try them.
If it fails to update (can't see the changes on screen) call for the menu to be redrawn with
DrawMenuBar(hWndDlg)