I am trying to get a submenu to make changes to it before it displays.
So, I created a handler OnInitMenu()for my window. And I planned to use it pMenu->GetMenuItemInfo()to get submenus.
However, this does not seem to work. To find the right menu, I must provide the menu command identifier (I do not find it satisfactory for the position of the position of the hard code). But the menu items that open the submenus do not have command identifiers. I can get the menu command that exists inside this submenu, but then I still do not have the menu itself.
How can I find a submenu nested in the main menu without relying on MF_BYPOSITION?
source
share