Click here to Skip to main content
12,819,019 members (28,084 online)
Click here to Skip to main content
Add your own
alternative version


41 bookmarked
Posted 6 Oct 2001

Collection Wizard

, 6 Oct 2001
Rate this:
Please Sign up or sign in to vote.
This program was written to make implementing a collection in ATL a snap
<!-- Download Links --> <!-- Article image -->

Sample Image - CollectionWizard.gif

<!-- Main HTML starts here -->


This program was written to make implementing a collection in ATL a snap. The first time I built a collection class in ATL it took me several hours. Than I found a very useful class written by Chris Brooks that allowed me to do it in 20 minutes. All this class needed was an easy way to generate the right parameters which is what this program does. Now you can generate a working collection class in half a minute.

This program also makes use of a .ocx that I wrote around a class by Michael Hofer (CDirTreeCtrl). In order for it to work you need to click on Install.bat in this folder (in LookHereFirst/).

How to make a collection class the easy way

  1. create an ATL dll project.
  2. add 2 classes (e.g Data and DataGroup)
  3. compile the project.

Now run CollectionWizard. First browse to your project's folder. Then click step 1. This will read the *_i.c file in your project and fill up the combo's. It will also read Collectionhelper.h included at the end of the .exe into your project's folder.

Make sure the right items are selected in the combo's and that the collection classname is spelled correctly.

Then hit step 2. All you need to do now is copy and paste the results in your .idl file and the collection class headerfile ('DataGroup.h').

Your collection is now fully implemented so you can concentrate on your 'Data' class instead!

The release version in LookHereFirst/ works "as is" but if for some reason you need to rebuild it it's a little trickier.

You will need to zip "collectionhelper.h" to the end of your .exe.

How to add collectionhelper.h to the end of your executable

Make  a directory /cpp at the root of your drive and place Collectionhelper.h there.

Then, build the project, run the release version and here,while holding down Ctrl+Shift click the lower copy button. This will create a folder temp2847 in your release folder with in it your new .exe that will take the place of the exe you just ran. (Simply cut and paste it to where you need it).

This version will have the file appended to the end which is what is needed for this program to work.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Netherlands Netherlands
VC++ and VB Programmer in the Netherlands

You may also be interested in...

Comments and Discussions

GeneralImplementing collection of atl objects (not interface pointers) Pin
idhunter21-Aug-03 2:18
memberidhunter21-Aug-03 2:18 
QuestionHow do I init a collection inside of my VC project Pin
Andreas Schurz5-Aug-02 22:06
sussAndreas Schurz5-Aug-02 22:06 
GeneralProblems with Collection wizard Pin
Hass24-Apr-02 3:59
memberHass24-Apr-02 3:59 
GeneralDon't work Pin
DenisK8-Oct-01 2:04
memberDenisK8-Oct-01 2:04 
GeneralRe: Don't work Pin
frans8-Oct-01 21:49
memberfrans8-Oct-01 21:49 
GeneralRe: Don't work Pin
tmugan16-Dec-01 21:16
membertmugan16-Dec-01 21:16 
GeneralDoes work Pin
frans13-Jan-02 9:32
memberfrans13-Jan-02 9:32 
GeneralRe: Don't work Pin
ameehan18-Aug-02 19:55
memberameehan18-Aug-02 19:55 
GeneralRe: Don't work Pin
joe!v13-Feb-03 4:03
memberjoe!v13-Feb-03 4:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170308.1 | Last Updated 7 Oct 2001
Article Copyright 2001 by frans
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid