-
November 13th, 2001, 10:01 AM
#1
MFC DYNCREATE
Hi i know how to create a CObject derived class as follows.
But the CObject class has an operator new.
How can i use this instead?
b
//everything rated
CRuntimeClass* pRuntimeClass = RUNTIME_CLASS(CNote1);
CObject* pObject = pRuntimeClass->CreateObject();
CNote1* pNewView = dynamic_cast<CNote1*>(pObject);
Of course I do it for the ratings!
-
November 13th, 2001, 10:06 AM
#2
Re: MFC DYNCREATE
Why not just
CNote1* pNewView = new CNotel;
-
November 13th, 2001, 10:11 AM
#3
Re: MFC DYNCREATE
thanks for trying, but this won't work because my constructor is declared protected.
I need the CObject::new operator somehow i thing.
b
Of course I do it for the ratings!
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
|