Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Custom popup menu in main menu (Read 3456 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Custom popup menu in main menu

Hi!
Does anybody know how to create custom popup menu in the main menu? Do I have to do anything with mainmenu_group, mainmenu_group_popup or mainmenu_group_popup_impl?

Custom popup menu in main menu

Reply #1
i did this with a mainmenu_group_popup:
the group and each command in it need to have a GUID

you basically derive from mainmenu_commands and return the guid of the group in get_parent and the guids of the commands in get_command
then you have to instanciate the commands and the group with

Code: [Select]
static mainmenu_commands_factory_t<derived_from_mainmenu_commands> foo;
static mainmenu_group_popup_factory mainmenu_group(guid_menu_group, mainmenu_groups::playback, mainmenu_commands::sort_priority_dontcare, "name_of_group");

where mainmenu_groups::playback is, where you want to see the menu group

 

Custom popup menu in main menu

Reply #2
i did this with a mainmenu_group_popup:
the group and each command in it need to have a GUID

you basically derive from mainmenu_commands and return the guid of the group in get_parent and the guids of the commands in get_command
then you have to instanciate the commands and the group with

Code: [Select]
static mainmenu_commands_factory_t<derived_from_mainmenu_commands> foo;
static mainmenu_group_popup_factory mainmenu_group(guid_menu_group, mainmenu_groups::playback, mainmenu_commands::sort_priority_dontcare, "name_of_group");

where mainmenu_groups::playback is, where you want to see the menu group


Thanks!