Creating Custom Tools with Microsoft Visual C++

You can create custom tools that perform common tasks, then add them to your Visual C++ development environment. Once you create a custom tool, it appears as an option on the Tools menu.

To create a custom tool, choose the Customize option at the Tools menu of Visual C++. Click the Tools tab, then enter settings that describe the custom tool into the text boxes of the Tools page. For more information, click the Add button on the Tools page. Click Help on the Add Tool dialog box.

Examples: Custom Tools

The following examples show the settings you specify to add tools to the Tools menu.

Tool for Building a Separate File

This tool builds a file that is not part of the project you currently have open. You can use the tool when you do not want to open a separate project, or add that file to your current project.

Menu Text                &nmake Other
Command:                 nmake.exe
Arguments:               (blank)
Initial Directory:       $Filedir
Prompt for Arguments:    (blank)
Redirect to Output Win   X
Close Window on Exit     (blank)
 

Tool for Rebuilding EXCHSDK.LIB

This tool rebuilds EXCHSDK.LIB after you have used NMAKE OTHER to build a library.

Menu Text                Make &ExchSDK.Lib
Command:                 nmake.exe
Arguments:               clean all
Initial Directory:       \edk\src\exchsdk (or your path)
Prompt for Arguments:    (blank)
Redirect to Output Win   X
Close Window on Exit     (blank)
 

Tool for Deleting the .EXE File or DLL

This tool deletes the executable file or DLL that you normally build with the current makefile.

Menu Text                &Delete Target
Command:                 c:\winnt\system32\cmd.exe (or your path)
Arguments:               /c "echo del $Target" & del $Target
Initial Directory:       (blank)
Prompt for Arguments:    blank)
Redirect to Output Win   (blank)
Close Window on Exit     (blank)
 

Tool for Making a File Writeable

This tool changes a read-only file to one that is writeable.

Menu Text                 Read/&Write
Command:                  c:\winnt\system32\cmd.exe (or your path)
Arguments:                /c  Attrib -r $Filename
Initial Directory:        $Filedir
Prompt for Arguments:     (blank)
Redirect to Output Win    (blank)
Close Window on Exit      X
 

Tool for Making a File Read-Only

This tool changes a file that is read/write to read-only.

Menu Text                Read Only
Command:                 c:\winnt\system32\cmd.exe (or your path)
Arguments:               /c  Attrib +r $Filename
Initial Directory:       $Filedir
Prompt for Arguments:    (blank)
Redirect to Output Win   (blank)
Close Window on Exit     X