Click here to Skip to main content
13,195,163 members (70,922 online)
Click here to Skip to main content
Add your own
alternative version


29 bookmarked
Posted 17 Jan 2000

ATL Object Wizard Property Page

, 3 May 2000
Rate this:
Please Sign up or sign in to vote.
A wizard that allows you to create an ATL Object Wizard Property Page
  • Download the source code - 38 Kb
  • Download the templates and precompiled DLL - 35 Kb
  • <!-- Article Starts -->

    This custom wizard allows you to create an ATL Object Wizard Property Page that can get called during your custom object creation.


    To install the ATL Object Wizard Property Page component you need to download and extract the files to '???\Program Files\Microsoft Visual Studio\Common\MSDev98\Template\ATL'. You then need to register atlsymwz.dll using regsvr32.exe. The ATL Object Wizard Property Page component should then be available from ATL Object Wizard.


    To create you very own ATL Object Wizard property page follow these simple steps:

    1. Start the ATL Object Wizard using the 'New ATL Object' option avalable from the menus.

    2. Select the ATL Object Wizard component from the Wizards category.

      [NOTE: As a final test of the wizard I recreated the wizard using the original wizard as a starting point]

    3. Fill in the Names and Strings pages as you would a normal Property Page object.

      This wizard is similar to the Property Page wizard found under the Controls category however the Attributes page has been removed and the following page has been added.

    4. Fill in the 'Object Wizard Settings' page.

      The Category field indicates what category you wish your component to come under and the Title field is for the name you wish to give your object. Two other field are supplied and these are the Control File and the Icon File, these fields indicate what .ctl file you wish to call when your object is selected and the icon file is for what Icon to display in the ATL Object Wizard. There are options to create stubs for these files if they do not already exist. [NOTE: several of the wizards use control.ctl as the control file but supply different icons]

    5. Add your own controls to the page and create your own symbols using the ISymbolMap interface. However before you start creating your own custom control templates I suggest you also read the references and investigate the currently available wizards that are available in '???\Program Files\Microsoft Visual Studio\Common\MSDev98\Template\ATL'.

    Auto Generated Code

    I have supplied two methods EnableOK() and DisableOK() which are used to enable and disable the OK button at the bottom of the property sheet. If you need to disable the OK button and only enable it when the user has filled in some fields, like I did with this wizard, then I suggest you put in a call to DisableOK() in the Apply method when m_hWnd is NULL (see the source code to atlsymwiz.dll.)


    • Template.txt found in '???\Program Files\Microsoft Visual Studio\Common\MSDev98\Template\ATL' - This is actually a HTML file and is easier if renamed or copied to template.htm

    • Q179385 - HOWTO: Add Custom ATL Objects to the ATL Object Wizard

    • Customizing the ATL Object Wizard A Real-World Example - Glenn Carr - should be available at Visual C++ Developers Journal

    • Q223439 - HOWTO: Using Class Wrappers to Access Windows Common Controls in ATL


    Even though I have tested the code in unicode format I decided it was needless as I wanted the wizards to run under VC6 regardless of whether they were running under NT or Win9x.


    Because I have used the STL to give me extra functionality such as maps and lists etc. this code does produce known warnings when compiled under 'Warning Level 4'.


    1 May 2000: Updated source so that registration code is inserted by the wizard as suggested by Erik Thompson


    This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


    About the Author

    Shaun Wilde
    Software Developer (Senior) MYOB
    Australia Australia
    All articles are supplied as-is, as a howto on a particular task that worked for me in the past. None of the articles are supposed to be out-of-the-box freeware controls and nor should they be treated as such. Caveat emptor.

    Now living and working in Australia, trying to be involved in the local .NET and Agile communities when I can.

    I spend a good chunk of my spare time building OpenCover and maintaining PartCover both of which are Code Coverage utilities for .NET.

    You may also be interested in...

    Comments and Discussions

    GeneralSuggestion: Add to your Control file (UPDATED) Pin
    Erik Thompson12-Apr-00 14:03
    sussErik Thompson12-Apr-00 14:03 
    GeneralRe: Suggestion: Add to your Control file (UPDATED) Pin
    Shaun Wilde15-Apr-00 0:32
    sussShaun Wilde15-Apr-00 0:32 
    GeneralSuggestion: Add to your Control file... Pin
    Erik Thompson12-Apr-00 14:02
    sussErik Thompson12-Apr-00 14:02 

    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
    Web03 | 2.8.171019.1 | Last Updated 4 May 2000
    Article Copyright 2000 by Shaun Wilde
    Everything else Copyright © CodeProject, 1999-2017
    Layout: fixed | fluid