Click here to Skip to main content
11,644,286 members (69,884 online)
Click here to Skip to main content

Collection Wizard

, 6 Oct 2001 73.8K 646 41
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 -->

Introduction

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.

License

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

Share

About the Author

frans
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 1:18
memberidhunter21-Aug-03 1:18 
QuestionHow do I init a collection inside of my VC project Pin
Andreas Schurz5-Aug-02 21:06
sussAndreas Schurz5-Aug-02 21:06 
Answer[Message Removed] Pin
stonber1-Oct-08 7:48
memberstonber1-Oct-08 7:48 
GeneralProblems with Collection wizard Pin
Hass24-Apr-02 2:59
memberHass24-Apr-02 2:59 
GeneralDon't work Pin
DenisK8-Oct-01 1:04
memberDenisK8-Oct-01 1:04 
GeneralRe: Don't work Pin
frans8-Oct-01 20:49
memberfrans8-Oct-01 20:49 
GeneralRe: Don't work Pin
tmugan16-Dec-01 20:16
membertmugan16-Dec-01 20:16 
GeneralDoes work Pin
frans13-Jan-02 8:32
memberfrans13-Jan-02 8:32 
GeneralRe: Don't work Pin
ameehan18-Aug-02 18:55
memberameehan18-Aug-02 18:55 
GeneralRe: Don't work Pin
joe!v13-Feb-03 3:03
memberjoe!v13-Feb-03 3:03 

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150731.1 | Last Updated 7 Oct 2001
Article Copyright 2001 by frans
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid