Click here to Skip to main content
Click here to Skip to main content

CWindowImpl ATL Object Wizard

By , 24 Apr 2001
 
  • 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
    Web Developer
    United States United States
    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.

    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.
    Search this forum  
        Spacing  Noise  Layout  Per page   
    GeneralDeskBand Install Vista IssuememberDabara18 Aug '09 - 20:25 
    Hi,
    I was just create a ATL COM dll with Deskband and when i was try to register with Vista , it did not register on Vista machine it work fine in Winxp machine.
    General[Message Removed]membernompel6 Oct '08 - 9:14 
    Spam message removed
    GeneralGreat, thanks!memberpeterchen25 Jul '06 - 23:58 
    (n/t)
     


    Some of us walk the memory lane, others plummet into a rabbit hole

    Tree in C# || Fold With Us! || sighist

    GeneralGreat WorkmemberPrafulla Tekawade21 Jul '06 - 1:25 
    Thanks Erik,for developing such a great wizard.
    It helped me lot in my project.
    Thanks
    GeneralRe: Great WorkmemberPrafulla Tekawade14 Sep '06 - 3:34 
    My Blog
    QuestionI have installed ,but there isn't icon like above,why?memberwangshilei28 Apr '05 - 17:35 
    I have installed ,but there isn't icon like above,why?
    AnswerRe: I have installed ,but there isn't icon like above,why?memberyuzhenzhen11 Apr '06 - 1:56 
    I have the similar problem.
    I didn't see the deskband icon in the window.
    what's the wrong?
     
    thank you!
    GeneralRe: I have installed ,but there isn't icon like above,why?memberPaulMdx17 Aug '06 - 23:54 
    I had this problem when the DLL was registered in a directory different to where VS was actually installed. The MSI installer didn't put the files in the right place for me (c:\Program Files\Microsoft Visual Studio\..., which for me is wrong). I downloaded the zip and installed the files in the right place and did the regsvr32 by hand.
    GeneralHellosussAnonymous26 Apr '05 - 2:28 
    i am a programmer how i can help you
    Generalwizard choise BUTTON no picturemembermargus19 Nov '03 - 3:40 
    Created window with ATL Object wizard( Original Class Name Button). I got button to display, but i can't now matter i try to draw anything on it. I can add all the window elements to that button like scrollbar and it responds to pressing. But i can't display image or text. Primary would to display image. But i can add other elements like combos and editboxes in that window. I create that class on toolbar like so:
     
    RECT rect2 = {150,0,300,100};
     
    mLogo.Create(m_hWnd, rect2, NULL, WS_CHILD|WS_VISIBLE|BS_FLAT| BTNS_BUTTON | BTNS_AUTOSIZE | BTNS_SHOWTEXT , 0,IDM_HOMEPAGE_WIN);
     
    Any ideas ?

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

    Permalink | Advertise | Privacy | Mobile
    Web01 | 2.6.130523.1 | Last Updated 25 Apr 2001
    Article Copyright 2000 by Erik Thompson
    Everything else Copyright © CodeProject, 1999-2013
    Terms of Use
    Layout: fixed | fluid