ATLComp.exe: Add Many ATL Simple Objects from ATL Object Wizard (256117)



The information in this article applies to:

  • Microsoft Visual C++, 32-bit Enterprise Edition 5.0
  • Microsoft Visual C++, 32-bit Enterprise Edition 6.0
  • Microsoft Visual C++, 32-bit Professional Edition 5.0
  • Microsoft Visual C++, 32-bit Professional Edition 6.0
  • Microsoft Visual C++, 32-bit Learning Edition 6.0
  • The Microsoft Active Template Library (ATL) 3.0
  • The Microsoft Active Template Library (ATL) 2.0

This article was previously published under Q256117

SUMMARY

The ATLComp.exe add-in sample enables you to insert many ATL-based COM classes from the ATL Object wizard. This sample in particular inserts the "Simple Object" from the ATL Object Wizard. Moreover, the ATLComp.exe add-in is based on the Developer Studio Object Model and Microsoft Foundation Classes (MFC). This sample is unsupported.

MORE INFORMATION

The following files are available for download from the Microsoft Download Center:
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

The self extracting ATLComp.exe file contains the following files:

File nameSize
Commands.cpp2KB
Commands.h2KB
DSAddIn.cpp4KB
DSAddIn.h2KB
InsertManyATLComp.cpp5KB
InsertManyATLComp.h1KB
InsertManyATLComp.dsw1KB
InsertManyATLComp.dsp6KB
InsertManyATLComp.def1KB
InsertManyATLComp.odl2KB
InsertManyATLComp.rc7KB
InsertManyATLComp.clw2KB
InsertManyATLComp.i_c2KB
InsertManyATLComp.rc21KB
TBarLrge.bmp2KB
TBarMedm.bmp1KB
ATLObjWizDlg.cpp2KB
ATLObjWizDlg.h2KB
InsertManyATLCompTypes.h6KB
Resource.h 2KB
StdAfx.cpp1KB
StdAfx.h3KB
InsertATLClass.cpp5KB
InsertATLClass.h2KB
ClassEditorDlg.cpp2KB
ClassEditorDlg.h2KB


Steps to Install the Add-In

  1. Run ATLComp.exe to extract the Visual C++ project.
  2. Build the project in Visual C++ in Release or Debug configuration.
  3. In Visual C++, click Customize from the Tools menu.
  4. In the Customize dialog box, click Add-Ins and Macro Files.
  5. Click Browse and locate the InsertManyATLComp.dll file that was built in step 2.
  6. Click OK to save the settings. A toolbar with the InsertManyATLComp command appears.

Using the ATLComp.exe Add-In

Click InsertManyATLComp to launch the "Insert Many ATL Object Wizard Components" dialog. In this dialog you can either choose to create a series of ATL classes or specify a custom list of classes to create. You can select one of them by choosing the appropriate radio button.

If you choose the first radio button then you should specify the short name for the "Simple Object", the start and end values. For example if you enter "MyObject" as the short name, 1 and 10 for the start and end values respectively, then clicking OK adds classes CMyObject1 through CMyObject10 to your project.

When the add-in is performing the task of adding classes you should avoid using the keyboard and avoid switching to another program. Also, do not add duplicate ATL classes.

If you find that the add-in fails to add a class or you get a build error then open the InsertATLClass.cpp file; go to line 173; change the delay amount passed to the Sleep function; rebuild the project and try adding the classes again. Sometimes problems arise due to synchronization. The default value passed to Sleep is 2000 milliseconds.

REFERENCES

See the following topics in the MSDN Library for Visual C++ 6.0 for documentation on Visual C++ Automation:

MSDN Library; Visual Studio Documentation; Visual C++ Documentation; Using Visual C++; Visual C++ User's Guide; Automating Tasks in Visual C++

Modification Type:MinorLast Reviewed:8/11/2004
Keywords:kbdownload kbDevStudio kbfile kbide kbinfo kbSample KB256117 kbAudDeveloper