I have a base class that is derived from the MFC CView class and the template class, for example:
template<class TYPE> class CMytViewT : public CView,public CMyTemplateClassT<TYPE> { DECLARE_DYNCREATE(CMyViewT<TYPE>) private: CMyViewT(); ' ' ' } IMPLEMENT_DYNCREATE(CMyViewT<TYPE>, CView)
Now I assume that the MFC macros will be upset by the templates, and I am considering the possibility of removing the dynamic creation macros for this class and re-introducing it for each template specialization. for instance
template<class TYPE> class CMytViewT : public CView,public CMyTemplateClassT<TYPE> { public: CMyViewT(); ' ' ' } Class CMyView : public CMyViewT<CMyClass> { DECLARE_DYNCREATE(CMyView) private: CMyView(); } IMPLEMENT_DYNCREATE(CMyView, CView)
I am wondering if this will cause problems in the future, since any other implementations that I have seen have macros included for all intermediate classes. I donβt see that it is necessary, but did I miss something?
Change Looking at Matthew Druzers answer below, I found the following article on Microsoft for communication , which says that support for IMPLEMENT_DYNAMIC_T was removed due to an error.
source share