Click here to Skip to main content
6,595,444 members and growing! (19,155 online)
Email Password   helpLost your password?
Platforms, Frameworks & Libraries » ATL » General     Intermediate

CWindowImpl ATL Object Wizard

By Erik Thompson

This is an ATL Object Wizard that eases window development using CWindowImpl. It removes the redundant copy-n-paste of code between class implementations
VC6, Windows, Visual Studio, ATL, Dev
Posted:30 Jul 2000
Updated:24 Apr 2001
Views:169,827
Bookmarked:74 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
17 votes for this article.
Popularity: 5.84 Rating: 4.75 out of 5

1

2

3
1 vote, 12.5%
4
7 votes, 87.5%
5
  • Download Source Files (MSI)- 175 Kb
  • Download Source Files (FLAT)- 29 Kb
  • Logo - RBCWindowImpl.gif

    Introduction

    This whole project came about after writing numerous CWindowImpl derived classes. I was tired of tracking down a CWindowImpl derived class that I could use as a base. Then from that derived class copy and pasting code segments from it to my newly derived CWindowImpl class implementation. I decided that instead of doing this repeatitive process every time I needed it, I would let an ATL Object Wizard do it for me with just a few clicks and key presses. I hope it eases your development and allows you to be more productive.

    Installation

    • Extract the MSI (Microsoft Installer) file from the source zip file above.
    • Run the RBCWindowImpl MSI file. It will install the files to the correct location as long as you set the install directory to be the drive and directory of Visual Studio.

    Examples of <DEVSTUDIO>:

    • D:\Program Files\Microsoft Visual Studio
    • C:\MyDevEnv

    It will then install the files to <DEVSTUDIO>\Common\MSDev98\Template\ATL.

    Usage

    To create a CWindowImpl derived implementation, do the following:

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

      Logo - RBCWindowImpl1.gif

    2. Select the "CWindowImpl" ATL Object Wizard component from the "RadBytes" category.

      Logo - RBCWindowImpl2.gif

    3. Fill in the Names Dialog page with your CWindowImpl derived class name information.
    4. Select CWindowImpl Property Page to Customize CWindowImpl derived class information (optional).

      CWindowImpl Property Page (class view) - RBCWindowImpl3.gif
      Options available when DECLARE_WND_CLASS is selected.

      CWindowImpl Property Page (classex view) - RBCWindowImpl4.gif
      Options available when DECLARE_WND_CLASS_EX is selected.

      CWindowImpl Property Page (superclass view) - RBCWindowImpl5.gif
      Options available when DECLARE_WND_SUPERCLASS is selected.

    5. Click Ok
    6. Implement your derived CWindowImpl class.

    Generated Code And Output

    Your project has now been fitted with the CWindowImpl derived class you have named and is ready for use. It gives a basic implementation without any message handlers added. The output created is a Source and Header files from the Short Name supplied in the ATL Object Wizard property page. The only existing file that gets modified by the wizard is your Project file (.DSP).


    Unicode

    The code generated will compile both under UNICODE and ANSI.


    History

    31 Jul 2000 - Initial Release
    15 Aug 2000 - Fixed bug in template header file for Message map name.
    - Fixed MSI install for correct placement of files.
    - Fixed DECLARE_WND_SUPERCLASS original class name bug for common controls.
    - Removed Debug condition from ctl file for wizard.
    25 Apr 2001 - Packaged for deployment in plain old ZIP file with install instructions.

    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

    About the Author

    Erik Thompson


    Member
    Erik lives in Redmond, Washington. He works as a Senior Software Engineer specializing in C++, COM, ATL and the middle-tier and now .NET. When he isn't coding for work, he can be found trying to extend Internet Explorer with yet another Desk band or simplifying his development process with ATL Object Wizards.

    He spends his free time snowboarding, mountain biking, and online gaming.
    Occupation: Web Developer
    Location: United States United States

    Other popular ATL articles:

    Article Top
    You must Sign In to use this message board.
    FAQ FAQ 
     
    Noise Tolerance  Layout  Per page   
     Msgs 1 to 25 of 34 (Total in Forum: 34) (Refresh)FirstPrevNext
    GeneralDeskBand Install Vista Issue PinmemberDabara21:25 18 Aug '09  
    General[Message Removed] Pinmembernompel10:14 6 Oct '08  
    GeneralGreat, thanks! Pinsupporterpeterchen0:58 26 Jul '06  
    GeneralGreat Work PinmemberPrafulla Tekawade2:25 21 Jul '06  
    GeneralRe: Great Work PinmemberPrafulla Tekawade4:34 14 Sep '06  
    GeneralI have installed ,but there isn't icon like above,why? Pinmemberwangshilei18:35 28 Apr '05  
    GeneralRe: I have installed ,but there isn't icon like above,why? Pinmemberyuzhenzhen2:56 11 Apr '06  
    GeneralRe: I have installed ,but there isn't icon like above,why? PinmemberPaulMdx0:54 18 Aug '06  
    GeneralHello PinsussAnonymous3:28 26 Apr '05  
    Generalwizard choise BUTTON no picture Pinmembermargus4:40 19 Nov '03  
    GeneralRe: wizard choise BUTTON no picture PinsitebuilderErik Thompson11:19 19 Nov '03  
    GeneralCan i pass the window message from ... PinmemberSaeed A. Siddiqui17:00 9 Nov '02  
    GeneralRe: Can i pass the window message from ... PinsitebuilderErik Thompson8:07 13 Nov '03  
    GeneralVS.NET support? PinmemberJörgen Sigvardsson23:48 30 Aug '02  
    GeneralRe: VS.NET support? PinsitebuilderErik Thompson7:45 13 Nov '03  
    GeneralRe: VS.NET support? Pinmemberbramp7:58 26 May '04  
    Generalabout Toolbar Pinmemberomid daghdar0:12 24 Aug '02  
    GeneralRe: about Toolbar PinsitebuilderErik Thompson7:59 13 Nov '03  
    GeneralCan Not Download PinmemberFaisal Aslam10:18 3 Jul '02  
    GeneralRe: Can Not Download PinsitebuilderErik Thompson11:09 3 Jul '02  
    GeneralRe: Can Not Download PinmemberFaisal Aslam1:44 7 Jul '02  
    GeneralAdding a drop-menu to the button PinmemberPaul Ingles9:51 19 Apr '02  
    GeneralRadBytes?? PinmemberAnonymous20:41 20 Mar '02  
    GeneralRe: RadBytes?? PinmemberAnonymous1:38 19 Apr '02  
    GeneralI can select atl templates... PinmemberMadNEt6:51 13 Jan '02  

    General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

    PermaLink | Privacy | Terms of Use
    Last Updated: 24 Apr 2001
    Editor: Chris Maunder
    Copyright 2000 by Erik Thompson
    Everything else Copyright © CodeProject, 1999-2009
    Web19 | Advertise on the Code Project