V
Vince
Hi,
I have a templated class implemented in one file called CDynWnd.h
and declared like this :
CDynWnd.h (declaration and implementation)
------------
template <class BASECLASS> class CDynWnd : public BASECLASS
{
// Construction
public:
CDynWnd(int nIDD);
CDynWnd(int nIDD, CWnd* pParent);
CDynWnd();
... and so on ...
}
Now I would like to declare a new class called CDynContextMenu,
so in the .h I declare it as shown below with a forward declaration
DynContextMenu.h
-----------------
#include "DynContextMenu.h" (Only declaration)
template <class BASECLASS> class CDynWnd;
class CDynContextMenu
{
public:
CDynContextMenu();
virtual ~CDynContextMenu();
virtual CMenu* GetPopupMenu( CDynWnd<BASECLASS>* editor );
protected:
CMenu m_menu;
};
DynContextMenu.cpp (implementation)
----------------
....
....
But when I compile I get this :
Compiling...
DynContextMenu.cpp
d:\developpement\borne_300705\dyncontextmenu.h(13) : error C2065:
'BASECLASS' : undeclared identifier
I have a templated class implemented in one file called CDynWnd.h
and declared like this :
CDynWnd.h (declaration and implementation)
------------
template <class BASECLASS> class CDynWnd : public BASECLASS
{
// Construction
public:
CDynWnd(int nIDD);
CDynWnd(int nIDD, CWnd* pParent);
CDynWnd();
... and so on ...
}
Now I would like to declare a new class called CDynContextMenu,
so in the .h I declare it as shown below with a forward declaration
DynContextMenu.h
-----------------
#include "DynContextMenu.h" (Only declaration)
template <class BASECLASS> class CDynWnd;
class CDynContextMenu
{
public:
CDynContextMenu();
virtual ~CDynContextMenu();
virtual CMenu* GetPopupMenu( CDynWnd<BASECLASS>* editor );
protected:
CMenu m_menu;
};
DynContextMenu.cpp (implementation)
----------------
....
....
But when I compile I get this :
Compiling...
DynContextMenu.cpp
d:\developpement\borne_300705\dyncontextmenu.h(13) : error C2065:
'BASECLASS' : undeclared identifier