Share via


Customizing Menus and Menu Items

Home Page (Customizing)OverviewHow Do I ... Topics

Some customization affects individual items on a menu, while other changes affect the menu as a whole. You can add, delete, copy, or move menu items. You can rename the menu or restore the original settings for a default menu. If you delete a default command (a command supplied by the Visual C++ user interface) from a menu, you can choose later to put it back or add it to a different menu or toolbar.

If you are using a screen reader (a device for people with vision disabilities) or related software, you can require the Menu Bar display to be compatible. The compatible Menu Bar is text-based.

What do you want to do?

Restore the original settings for a default menu

Rename a custom menu

Add a command or other item to a menu

Delete a command from a menu

Restore a deleted default command to a menu

Move or copy a menu command

Always display the Menu Bar compatible with a screen reader

Customize menus on toolbars

To restore the original settings for a default menu

  1. Display the toolbar that contains the menu you want to restore to its original settings.

  2. On the Tools menu, click Customize. The Customize dialog box must remain open; however, you might need to move it out of your way.

  3. Right-click the menu name on the toolbar, and then click Reset on the shortcut menu.

Note   Reset restores the default menu to its original image, commands, and submenus. Default submenus are restored to their original form, and custom submenus are removed.

To rename a custom menu

  1. Display the toolbar that contains the menu you want to rename.

  2. On the Tools menu, click Customize. The Customize dialog box must remain open; however, you might need to move it out of your way.

  3. Right-click the menu you want to rename on the toolbar, and then click Button Appearance.

  4. Type the new menu name in the Button Text box. To specify a letter as the accelerator key, insert an ampersand before the letter.

To add a command or other item to a menu

  1. Display the toolbar that contains the menu to which you want to add a command or other item.

  2. On the Tools menu, click Customize, and then click the Commands tab. The Customize dialog box must remain open; however, you might need to move it out of your way.

  3. In the Categories box, click a category for the command or other item. To add a menu command that runs a macro, click Macros.

  4. Drag the item you want from the Commands box over the menu on the toolbar. When the menu displays a list of menu commands, point to the location where you want the item to appear on the menu, and then release the mouse.

Notes   If you don’t see the command you want under a particular category, click All Commands in the Categories box.

If you add a command to a menu, and the new command doesn’t appear on the menu when you want to use it, the command may be hidden because it is not available in the current editor. To verify that the command was added to the menu, you can view the complete menu, containing all commands for all editors at the same time. The complete menu is only available while the Customize dialog box is open. On the Commands tab in the Customize dialog box, click All Editors in the Show Menus For list. If the missing command is listed when you display commands for All Editors, it will appear on the menu in any editor where it applies.

To delete a command from a menu

  1. Display the toolbar that contains the command you want to delete.

  2. On the Tools menu, click Customize, and then click the Commands tab. The Customize dialog box must remain open; however, you might need to move it out of your way.

  3. Click the menu on the toolbar that contains the command you want to delete.

  4. Drag the command you want to delete off the menu.

To restore a deleted default command to a menu

  1. Display the toolbar that contains the menu to which you want to restore a command.

  2. On the Tools menu, click Customize, and then click the Commands tab.

  3. In the Categories box, click the Deleted Commands category.

  4. Drag the command you want from the Commands box over the menu on the toolbar. When the menu displays a list of menu commands, point to the location where you want the command to appear on the menu on the toolbar, and then release the mouse.

To move or copy a menu command

  1. Display the toolbar with the menu that contains the command you want to move or copy. Next, display the toolbar with the menu you want to add the command to.

  2. On the Tools menu, click Customize, and then click the Commands tab. The Customize dialog box must remain open; however, you might need to move it out of your way.

  3. On the toolbar, click the menu that contains the command you want to move or copy.

  4. To move the command, drag it over the menu you want. When the menu displays a list of commands, point to where you want the command to appear on the menu, and then release the mouse. To copy the command, hold down CTRL and drag the command over the menu you want. When the menu displays a list of commands, point to where you want the command to appear on the menu, and then release the mouse button.

To always display the Menu Bar compatible with a screen reader

  1. On the Tools menu, click Options, and then click the Workspace tab.

  2. Check Use Screen-reader Compatible Menus.

Note   When this option is checked, the Menu Bar that displays at the top of Visual C++ is text-based. If you are using this screen-reader compatible option, you cannot customize the menus by adding graphics.