Click here to Skip to main content
15,887,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCTabCtrl and CRuntimeClass - is there a better way? Pin
Vaclav_23-May-12 6:08
Vaclav_23-May-12 6:08 
AnswerRe: CTabCtrl and CRuntimeClass - is there a better way? Pin
Aescleal23-May-12 6:47
Aescleal23-May-12 6:47 
GeneralRe: CTabCtrl and CRuntimeClass - is there a better way? Pin
Vaclav_23-May-12 7:42
Vaclav_23-May-12 7:42 
GeneralRe: CTabCtrl and CRuntimeClass - is there a better way? Pin
Vaclav_23-May-12 10:29
Vaclav_23-May-12 10:29 
GeneralRe: CTabCtrl and CRuntimeClass - is there a better way? Pin
Aescleal23-May-12 23:46
Aescleal23-May-12 23:46 
GeneralRe: CTabCtrl and CRuntimeClass - is there a better way? Pin
Aescleal23-May-12 23:57
Aescleal23-May-12 23:57 
GeneralRe: CTabCtrl and CRuntimeClass - is there a better way? Pin
Vaclav_24-May-12 3:39
Vaclav_24-May-12 3:39 
GeneralRe: CTabCtrl and CRuntimeClass - is there a better way? Pin
Vaclav_24-May-12 7:31
Vaclav_24-May-12 7:31 
I found my pure virtual function problem - the base abstract class cannot be instantiated, so IMPLEMENT_DYNCREATE and DECLARE_DYNCREATE pair ( MFC "standard" )need to be deleted.
Working with MFC is fun!
Next problem...



Hello Ash, sorry to bug you , but I told you I am a greenie in using inheritance.
My learning process is not starting well.
I am not sure if it is me or VC 6.0 wizard, but I cannot get the pure virtual function defined using wizard or manually.
Maybe I am missing some setting in compiler commands?
I a have never used virtual options in the wizards.

Here is the compiler error:



Z:\0\0 MDI\V1\TCC_MDIView_Base.cpp(17) : error C2259: 'CTCC_MDIView_Base' : cannot instantiate abstract class due to following members:
z:\0\0 mdi\v1\tcc_mdiview_base.h(13) : see declaration of 'CTCC_MDIView_Base'
Z:\0\0 MDI\V1\TCC_MDIView_Base.cpp(17) : warning C4259: 'void __thiscall CTCC_MDIView_Base::Test(void)' : pure virtual function was not defined
z:\0\0 mdi\v1\tcc_mdiview_base.h(24) : see declaration of 'Test'
Z:\0\0 MDI\V1\TCC_MDIView_Base.cpp(17) : error C2259: 'CTCC_MDIView_Base' : cannot instantiate abstract class due to following members:
z:\0\0 mdi\v1\tcc_mdiview_base.h(13) : see declaration of 'CTCC_MDIView_Base'
Z:\0\0 MDI\V1\TCC_MDIView_Base.cpp(17) : warning C4259: 'void __thiscall CTCC_MDIView_Base::Test(void)' : pure virtual function was not defined
z:\0\0 mdi\v1\tcc_mdiview_base.h(24) : see declaration of 'Test'

Here is the base calls declartion:
virtual void Test() = 0;

The VC++ 6.0 wizard does not generate the definition. I undestand pure virtual does not need it, but the compiler complains about it, twice! I understand I could define it in base class, but even than I get same warnings / errors.

Here is the definition in the derived class and there are no errors from compiler.

void CTCC_MDIView_Base_Preview::Test()
{
}

I also do not get why there are warnings and errors.
Both "problems" should be errors. But that is my opinion.
Again, thanks for your help and time.
Vaclav

-- modified 24-May-12 23:14pm.
Questionnew and free Pin
pix_programmer23-May-12 0:23
pix_programmer23-May-12 0:23 
AnswerRe: new and free Pin
CPallini23-May-12 1:00
mveCPallini23-May-12 1:00 
GeneralRe: new and free Pin
pix_programmer23-May-12 1:13
pix_programmer23-May-12 1:13 
GeneralRe: new and free Pin
CPallini23-May-12 1:48
mveCPallini23-May-12 1:48 
AnswerRe: new and free Pin
«_Superman_»23-May-12 4:54
professional«_Superman_»23-May-12 4:54 
QuestionUnable to write to shared memory Pin
manoharbalu22-May-12 20:20
manoharbalu22-May-12 20:20 
AnswerRe: Unable to write to shared memory Pin
Malli_S22-May-12 20:34
Malli_S22-May-12 20:34 
GeneralRe: Unable to write to shared memory Pin
manoharbalu22-May-12 22:40
manoharbalu22-May-12 22:40 
AnswerRe: Unable to write to shared memory Repost Pin
Richard MacCutchan22-May-12 22:34
mveRichard MacCutchan22-May-12 22:34 
GeneralRe: Unable to write to shared memory Repost Pin
Richard Andrew x6423-May-12 12:08
professionalRichard Andrew x6423-May-12 12:08 
QuestionSyncronisation problem Pin
VCProgrammer22-May-12 20:13
VCProgrammer22-May-12 20:13 
AnswerRe: Syncronisation problem Pin
Malli_S22-May-12 20:45
Malli_S22-May-12 20:45 
AnswerRe: Syncronisation problem Pin
Erudite_Eric22-May-12 21:52
Erudite_Eric22-May-12 21:52 
AnswerRe: Syncronisation problem Pin
Richard MacCutchan22-May-12 22:33
mveRichard MacCutchan22-May-12 22:33 
AnswerRe: Syncronisation problem Pin
ThatsAlok23-May-12 3:55
ThatsAlok23-May-12 3:55 
Questionunable to write into the shared memory Pin
manoharbalu22-May-12 4:02
manoharbalu22-May-12 4:02 
AnswerRe: unable to write into the shared memory Pin
Richard Andrew x6422-May-12 4:08
professionalRichard Andrew x6422-May-12 4:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.