R
Rezmondo
Guest
I've used the Visual Studio project wizards to create some basic GUI apps with VC++.
When debugging, I've noticed the native MFC code to be riddled with syntax such as this:
derivedClass::Method()
{
baseClass::Method();
}
For exmaple, I created a simple Windows app titled MFCApp.
The wizard naturally creates classes derived from CwinAppEx, CDocument and CView, called, CMFCAppAPP, CMFCAppDoc and CMFCAppView.
Inside the implementation of these derived classes I frequently encounter code like:
void CMFCAppDoc::AssertValid() const
{
CDocument::AssertValid();
}
and
void CMFCAppView:ump(CDumpContext& dc) const
{
CView:ump(dc);
}
I am very perplexed by this because according to all the books I've read and my experience, you can only call a base class method via the scope resolution operator, if and only if that said method is Static, which in all these exaples I have encountered in the MFC code, that is not true. The compiler should flag a compilation error C2352 a link to which is here:
Compiler Error C2352
Please help me because I'm highly perplexed.
Many Thanks, Rez
Continue reading...
When debugging, I've noticed the native MFC code to be riddled with syntax such as this:
derivedClass::Method()
{
baseClass::Method();
}
For exmaple, I created a simple Windows app titled MFCApp.
The wizard naturally creates classes derived from CwinAppEx, CDocument and CView, called, CMFCAppAPP, CMFCAppDoc and CMFCAppView.
Inside the implementation of these derived classes I frequently encounter code like:
void CMFCAppDoc::AssertValid() const
{
CDocument::AssertValid();
}
and
void CMFCAppView:ump(CDumpContext& dc) const
{
CView:ump(dc);
}
I am very perplexed by this because according to all the books I've read and my experience, you can only call a base class method via the scope resolution operator, if and only if that said method is Static, which in all these exaples I have encountered in the MFC code, that is not true. The compiler should flag a compilation error C2352 a link to which is here:
Compiler Error C2352
Please help me because I'm highly perplexed.
Many Thanks, Rez
Continue reading...