To create your plugin, start a new project from Microsoft Visual Studio .NET 2003 and choose File -> New Project.

Select "Visual C++ Projects" from the list on the left, then "ATL Project" from the choices on the right. Enter a name (we will use "MyPlugin") and location for your plugin and click OK. You will then see this dialog:

The default settings are fine, so click Finish. Your new project will now open. Switch to Class View for your project, either by clicking the tab or selecting View -> Class View.

Right-click on your plugin (the first item) and when the context menu appears, choose Add Class. You will see this dialog:

Select "ATL Simple Object" from the choices on the right, and click Open. You will next see this dialog:

Enter a name for your plugin in the "Short name" box. The remaining fields will the be automatically filled in. In our example, we will use "MyPlugin" as the Short name; this requires us to edit ".h file" and ".cpp file" to use "MyPluginCtrl.h" and "MyPluginCtrl.cpp" to prevent collisions with the MyPlugin.h and MyPlugin.cpp files generated when we created our project. There is no need to set any of the fields on the "Options" tab, so just click Finish once you have entered your plugin name.
You will then be taken to the .h file (MyPluginCtrl.h for us) for your newly created object. You now have a working COM object. In the next step, we will make your object into an ACC plugin.
Next Lesson | Back to Table of Contents
Questions? Visit
http://developer.aim.com/
Last updated: 03/17/2007