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

     
    Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
    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 
    General[Message Removed]membernompel6 Oct '08 - 9:14 
    GeneralGreat, thanks!memberpeterchen25 Jul '06 - 23:58 
    GeneralGreat WorkmemberPrafulla Tekawade21 Jul '06 - 1:25 
    GeneralRe: Great WorkmemberPrafulla Tekawade14 Sep '06 - 3:34 
    QuestionI have installed ,but there isn't icon like above,why?memberwangshilei28 Apr '05 - 17:35 
    AnswerRe: I have installed ,but there isn't icon like above,why?memberyuzhenzhen11 Apr '06 - 1:56 
    GeneralRe: I have installed ,but there isn't icon like above,why?memberPaulMdx17 Aug '06 - 23:54 
    GeneralHellosussAnonymous26 Apr '05 - 2:28 
    Generalwizard choise BUTTON no picturemembermargus19 Nov '03 - 3:40 
    GeneralRe: wizard choise BUTTON no picturesitebuilderErik Thompson19 Nov '03 - 10:19 
    QuestionCan i pass the window message from ...memberSaeed A. Siddiqui9 Nov '02 - 16:00 
    Hi!
     
    i m facing a problem while building a control in ATL with events.
    i use a MFC-CWnd derived class in a ATL-Full Control class.
    The call of the MFC-CWnd derived class is within the MFC-CWinThread derived class. The MFC-CWnd derived class also have a paability to recieve window messages like OnPaint(), OnClick(), OnLButtonDown() etc...
    I want to transfer the OnLButtonDown message to ATL-control class's some event Smile | :)
    But i couldn't do that i don't know how is pass this message to ATL class while there is no relation b/w all classes Cry | :((
    Means ATL call MFC-CWinThread class which further call MFC-CWnd class
    Also how i get the HWND of the window that contains the control? Confused | :confused:
     

    AnswerRe: Can i pass the window message from ...sitebuilderErik Thompson13 Nov '03 - 7:07 
    QuestionVS.NET support?memberJörgen Sigvardsson30 Aug '02 - 22:48 
    AnswerRe: VS.NET support?sitebuilderErik Thompson13 Nov '03 - 6:45 
    GeneralRe: VS.NET support?memberbramp26 May '04 - 6:58 
    Generalabout Toolbarmemberomid daghdar23 Aug '02 - 23:12 
    GeneralRe: about ToolbarsitebuilderErik Thompson13 Nov '03 - 6:59 
    QuestionCan Not DownloadmemberFaisal Aslam3 Jul '02 - 9:18 
    AnswerRe: Can Not DownloadsitebuilderErik Thompson3 Jul '02 - 10:09 
    GeneralRe: Can Not DownloadmemberFaisal Aslam7 Jul '02 - 0:44 
    GeneralAdding a drop-menu to the buttonmemberPaul Ingles19 Apr '02 - 8:51 
    QuestionRadBytes??memberAnonymous20 Mar '02 - 19:41 
    AnswerRe: RadBytes??memberAnonymous19 Apr '02 - 0:38 
    GeneralI can select atl templates...memberMadNEt13 Jan '02 - 5:51 
    GeneralRe: I can select atl templates...membercool_bamit18 Apr '02 - 6:11 
    QuestionIt can only be used in ATL projects ?memberPhil.B23 Aug '01 - 9:32 
    Generalmsi needs service packmemberRashid Thadha25 Apr '01 - 5:49 
    GeneralRe: msi needs service packmemberErik Thompson25 Apr '01 - 7:13 
    GeneralCant catch the exe filessussJørgen Granborg23 Aug '00 - 10:58 
    GeneralRe: Cant catch the exe filessussErik Thompson23 Aug '00 - 17:03 
    QuestionAre There Problems Grabbing EXE install?sussErik Thompson2 Aug '00 - 18:59 
    AnswerRe: Are There Problems Grabbing EXE install?sussMike Player4 Aug '00 - 4:09 
    GeneralRe: Are There Problems Grabbing EXE install?sussErik Thompson4 Aug '00 - 5:28 

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

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