jwilcox
asked on
DYNCREATE
I'm trying to user DYNCREATE in my MFC Application, unfortunatly I get the following errors:
Error C2509: 'CreateObject': member function not declared in MainWnd
Error C2509: '_GetBaseClass': member function not declared in MainWnd
Error C2039: 'classMainWnd: is not a member of MainWnd
Error C2248: '_GetBaseClass': cannot access protected member declared in class 'CFrameWnd'
MainWnd is delcared as MainWnd : public CFrameWnd
and I have IMPLEMENT_DYNCREATE(MainWn d, CFrameWnd) in my implementation file and DECLARE_DYNCREATE(MainWnd)
Any help would be appreciated!
Error C2509: 'CreateObject': member function not declared in MainWnd
Error C2509: '_GetBaseClass': member function not declared in MainWnd
Error C2039: 'classMainWnd: is not a member of MainWnd
Error C2248: '_GetBaseClass': cannot access protected member declared in class 'CFrameWnd'
MainWnd is delcared as MainWnd : public CFrameWnd
and I have IMPLEMENT_DYNCREATE(MainWn
Any help would be appreciated!
ASKER
Sorry, its declared as MainWnd: public CFrameWnd, just an oversight on my part.
ASKER
Edited text of question
Do you have a creator and a destructor?
If you do not need one declare an empty one :
MainWnd(){};
virtual ~MainWnd(){};
If you do not need one declare an empty one :
MainWnd(){};
virtual ~MainWnd(){};
ASKER
Yeah I do have a destructor and a constructor, thanks for your help anyways, though.
Jason
Jason
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
class MainWnd : CFrameWnd
just do this
class MainWnd : public CFrameWnd