How to remove Visual C ++ "Expand Menu" Arrow?

When I create a menu with a submenu in Visual C ++, I find that the submenus start as arrows, which I must click to expand to see their contents. Is there a way (programmatically) so that the pop-up submenu is already expanded (without an arrow to click)?

Here is an image of what I'm talking about before and after clicking on the specified arrow:   screenshot http://www.postimage.org/Pq1qL6rr-94b725163c3880972bb5b7518d00732b.jpg also here

+3
source share
1 answer

It seems you are using the MFC Feature Pack. Go to CMainFrame::OnCreate(), you can find something like

CMFCToolBar::SetBasicCommands(lstBasicCommands);

somewhere inside.

lstBasicCommands 

- This is a list containing all the menu items that will not be hidden initially. Just fill it in with the items you like.

You can also check the sample code, which can be found here: C: \ Program Files \ Microsoft Visual Studio 9.0 \ Samples \ 1033

If you do not call SetBasicCommands and do not create a list, the expand button is deleted. This frees you from increasing the list every time you add a new team.

+6
source

Source: https://habr.com/ru/post/1714262/


All Articles