Click here to Skip to main content
Licence CPOL
First Posted 17 Jan 2000
Views 56,812
Bookmarked 29 times

ATL Object Wizard Property Page

By | 3 May 2000 | Article
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
  • This custom wizard allows you to create an ATL Object Wizard Property Page that can get called during your custom object creation.

    Installation

    To install the ATL Object Wizard Property Page component you need to download ATL_pp_wizard_dll.zip 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.

    Usage

    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.)

    References

    • 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

    Unicode

    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.

    STL

    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'.

    History

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

    License

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

    About the Author

    Shaun Wilde

    Architect

    United Kingdom United Kingdom

    Member

    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.
     
    Been involved in programming from the early '80s. First on my Spectrum, then an Amstrad. Did lots of Fortran while at University before becoming involved in Forth, Prolog, Pascal, Occam, C and eventually C++. Eventually started programming on the Windows platform using Borland’s OWL framework, during my postgraduate years. When I started work in '94, I learnt MFC followed by COM and ATL and never looked back. Now working exclusively in .NET, working on WinForms, ASP.NET and the Compact Framework using C# and VB.NET. Using every bit of the .NET framework I can such as WebServices and writing my own controls for my .NET Portal, and for the Compact Framework. Still lots I don't know, but the end of the universe hasn't happened yet - I wonder if I'll have time?
     
    I was a permanent employee for a number of companies until Dec 2000 before going independent after the DotCom I ws involved with went DotBomb. Now supplying consulting services to various institutions in London and surrounding regions i.e. UK Smile | :) .
     
    Now living and working in Australia, trying to be involved in the local .NET and Agile communities. Also maintaining an open source code coverage tool called PartCover whilst thinking of developing a new one.

    Sign Up to vote   Poor Excellent
    Add a reason or comment to your vote: x
    Votes of 3 or less require a comment

    Comments and Discussions

     
    You must Sign In to use this message board. (secure sign-in)
     
    Search this forum  
     FAQ
        Noise  Layout  Per page   
      Refresh
    GeneralSuggestion: Add to your Control file (UPDATED) PinsussErik Thompson14:03 12 Apr '00  
    GeneralRe: Suggestion: Add to your Control file (UPDATED) PinsussShaun Wilde0:32 15 Apr '00  
    GeneralSuggestion: Add to your Control file... PinsussErik Thompson14:02 12 Apr '00  

    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.

    Permalink | Advertise | Privacy | Mobile
    Web02 | 2.5.120517.1 | Last Updated 4 May 2000
    Article Copyright 2000 by Shaun Wilde
    Everything else Copyright © CodeProject, 1999-2012
    Terms of Use
    Layout: fixed | fluid