|
-
October 16th, 2005, 03:01 PM
#1
IMPLEMENT_DYNCREATE and abstract base classes
I have
CScrollView which inherits from CView
- it add some virtual methods.
CEditScrollView whith inherits from CScrollView
- it implements those virtual methods.
In EditScrollView..h/cpp, I have
DECLARE_DYNCREATE(CEditScrollView)
IMPLEMENT_DYNCREATE(CEditScrollView, CScrollView)
I do NOT have those specified for CScrollView (since it is an abstract class)
In "Debug" configurations, this compiles fine.
In "Release" configurations, I get the following error:
error C2039: 'classCScrollView' : is not a member of 'CScrollView'
This suggests I need to have a IMPLEMENT_DYNCREATE(CScrollView, CView), but of course, it won't let me do that since the class is abstract.
Is it safe to instead to
IMPLEMENT_DYNCREATE(CEditScrollView, CView)
(thus "skipping" the immediate base class?)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|