'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::Dump(CDumpContext& dc) const
{
CView::Dump(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:
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2352?f1url=https%3A%2F%2Fmsdn.microsoft.com%2Fquery%2Fdev15.query%3FappId%3DDev15IDEF1%26l%3DEN-US%26k%3Dk(C2352)%26rd%3Dtrue&view=vs-2017
Please help me because I'm highly perplexed.
Many Thanks, Rez
What I have tried:
This a question so i have not tried anything.