Open fireph opened 6 years ago
Updated to use DestroyMenu
Any blockers on getting this merged?
I am still concerned about resource leaks. When using submenus we call "CreatePopupMenu" more times and these resources have to be deleted. We don't do that today (already bad) and this option could make it worse. We should probably keep a collection of all menu and menu icons we create and release them when updating the options.
@wiggin15 Please please please please can you implement some form of this?? I really want to be able to add new menu options with a dialogue on the fly
This adds a new parameter to the update function such that the menu_options can be updated the same way that the icon/hover text can be updated. I wanted this functionality for an app where an item in the right click menu changes based on state, and this pull request adds this functionality.
I also tried to avoid duplicated code and keep the menu creation code in one central function "_set_menu_options"