Share via


Customizing the Tools Menu

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

You can add up to 16 commands to the Tools menu. These commands can be associated with any program that will run on your operating system. You can also specify arguments for any command that you add to the Tools menu.

What do you want to do?

Add a command to the Tools menu

Edit a command on the Tools menu

Remove a command from the Tools menu

Specify an argument for a Tools menu command

Add an argument macro

Learn about error syntax for tools

To add a command to the Tools menu

As an example, the following procedure demonstrates how to add the Windows Notepad accessory to the Tools menu.

  1. On the Tools menu, click Customize, and then click the Tools tab.

  2. To add a tool, in the Menu Contents box, scroll to the bottom of the list, double-click the blank line (indicated by an empty rectangle), type the name of the tool as you want it to appear on the Tools menu, and press ENTER.

    For example, if you want to add a command for the Windows Notepad accessory, you might type Notepad. The remaining steps specify what action will occur when the new Notepad command is selected.

  3. In the Menu Contents box, highlight the name of the tool you just entered.

  4. In the Command box browse or type the path and name of the program, for example, C:\WINDOWS\NOTEPAD.EXE.

  5. In the Arguments text box, browse or type any arguments to be passed to the program.

    You can use the drop-down arrow next to the Arguments text box to display a menu of arguments. Select an argument from the list to insert argument syntax into the Arguments text box. Visual C++ provides the argument macros shown in the Argument Macros table.

  6. In the Initial Directory box, type the file directory where the command is located and click OK.

    You can use the drop-down arrow next to the Initial Directory text box to display a menu of directories. Select a directory from the list to insert directory syntax into the Initial Directory text box.

Notes   Once the command appears on the Tools menu, to run the program, choose it from the menu.

You can change the default menu name of the newly added tool by editing the Menu Text box. You can also add arguments to be passed to the program by typing them in the Arguments text box or set the initial directory for your program by typing it in the Initial Directory text box.

If the program you are adding to the Tools menu has a .PIF file, the startup directory specified by the .PIF file overrides the directory specified in the Initial Directory text box.

To edit a command on the Tools menu

  1. On the Tools menu, click Customize, and then click the Tools tab.

  2. In the Menu Contents box, select the command that you want to edit.

  3. Perform one or more of the following actions:

    • To move the command up one position in the menu, choose the Move Up button.

    • To move the command down one position in the menu, choose the Move Down button.

    • To change the menu text, command line (tool path and file name), command-line arguments, or the initial directory, type the new information in the appropriate text box.

    • To specify a letter in the menu title as an access key, precede that letter in the Menu Contents box with an ampersand.

      The first letter in the title is the keyboard access key by default.

    • To specify that a console application’s output is displayed in the Output window rather than in the console window, click Use Output Window.

    • To specify that the window associated with the tool close when you close the tool, select Close Window on Exiting.

    • To be prompted for command-line arguments each time you run the tool, select Prompt For Arguments.

To remove a command from the Tools menu

  1. On the Tools menu, click Customize,and then click the Tools tab.

  2. In the Menu Contents box, select the command you want to delete and press the Delete button.

To specify arguments for a Tools menu command

  1. On the Tools menu, click Customize, and then click the Tools tab.

  2. In the Menu Contents box, select the command for which you want to specify arguments.

    In the Arguments text box, type the arguments that you want or select the drop-down arrow to the right of the Arguments text box to display a list of arguments.

Visual C++ provides the argument macros shown in the Argument Macros table.