CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Location
    Northeast
    Posts
    6

    MFC and Templates

    Is there a way to create a CWnd derived class that is also a template class? I have a project where all of my CWnd classes are derived from a common base class that contains standard functionality. However, it would be more useful if I could create the CWnd derived class using template <CBaseDerivedClass> so the base class functionality could be customized for each window. Any ideas on if this is possible with MFC's CWnd class?


  2. #2
    Join Date
    Jun 1999
    Location
    Miami, FL
    Posts
    972

    Re: MFC and Templates

    I'm not sure what you want to accomplish. But it should be possible to do this:

    template <class T>
    class CWndTemplate : public CWnd
    {
    ...
    };





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured