Share via


Adding Classes to the Gallery

OverviewHow Do I

You can convert classes from your own projects into reusable components. The Gallery stores such classes as user-defined components (.OGX files).

To add a class to the Gallery

  1. Open the project workspace in which the class to be added exists.

    If you have more than one project loaded in the workspace, select the appropriate project: On the Project menu, point to Set Active Project, and click the name.

  2. From ClassView, right-click on a class and click Add to Gallery on the shortcut menu.

  3. The Add to Gallery command creates a new folder in the Gallery with the same name as the project. Add to Gallery also creates and places a user-defined component (.OGX file) in the new folder. The .OGX file allows other applications to share the class you added to the Gallery.

    Default Gallery folders are located in:

    \Program Files\Microsoft Visual Studio\Common\MSDEV98\Gallery

In the Gallery, you can rename, move, or copy user-defined components by right-clicking on them and selecting the appropriate command from the shortcut menu.

It is recommended that you not move user-defined components (.OGX file) to the default Gallery folders (Registered ActiveX Controls and Visual C++ Components).