command works in Visual C++ 5.0. The AddFile method was added with the Visual Studio 6.0 release.
Removing Shortcut Keys
After you load the add-in, you can remove the shortcut keys for the menu items that stop Visual C++ and assign them to the two add-in commands by following the steps below: 1. From the Visual C++ Tools menu, click Customize. 2. In the Customize dialog box, click the Keyboard tab. 3. From the Category box select File. 4. In the Commands window, select FileOpen. 5. In the Current keys window, select the CTRL+O entry and then click Remove. 6. From the Category box select Project. 7. In the Commands window, select InsertFilesIntoProject. If there is a shortcut associated with it, follow step 5 to remove it. By default there is no shortcut key for this item. 8. From the Category box select Add-Ins. 9. The two add-in commands AddFileToProject and OpenFile appear in the Commands window. 10. Select OpenFile then put the cursor in the Press New Shortcut Key box, press the shortcut key or key combination that you want, and click Assign. 11. Repeat the above step for the other command. The assigned shortcut keys for the two commands appear in the Current Keys window. You may also wish to remove the menu commands and insert the AddIn commands in their place. To insert the new AddIn commands in the MenuBar, use the following steps: 1. From the Visual C++ Tools menu, click Customize. 2. Click the File menu and then drag the Open command off of the File popup and release it. 3. Click the Project menu, click Add To Project and then drag the Files command off of the popup and release it. 4. In the Customize dialog box, select the Commands tab. 5. Select Add-ins from the Category list box. 6. Drag the OpenFile command to the File menu and drop it in the space vacated by the Open command. 7. Drag the AddFileToProject command to the Add To Project item on the Project menu and drop it in the space vacated by the Files command. When the menus have been modified as above, it is not necessary to have the
AddIn toolbar visible.