need some class help
I have noticed some things (for sometime now) that I did not run across when I first
read about C++ nor do I think I really understand them. Could someone please
explain the differences (or definitions ) of these. Would really appreciate this.
What is a SuperClass (is this like a base class ? )
What is a SubClass (is this like a derived class ?
What is a nested class ( is this what I used to know as Composition of a class ? )
And exactly what is being compiled when (in the VStudio Class wizard ) when I
create a resource control variable of category "Control" and of type "DerivedClass"
and the Control is owned by the FormViewClass? I.e. the DerivedClass has a function
that is replacing the resource control's Base Class function but the resource control is
owned by the FormViewClass or it's window ?. The generated code looks like this
in the FormViewClass header file there is:
#include "DerivedClass.h" // docs said to add the derived class include here and in fact it
// does not work without it, but causes sbrowser to act strange
class FormViewClass : public CFormView
{
............<cut out >.............
public:
//{{AFX_DATA(CTry_1View) // This all class wizard generate stuff
enum { IDD = IDD_TRY_1_FORM };
DerivedClass m_FormListBoxObj; //<-this is the resource controls varible of category "Control"
//}}AFX_DATA // and of type "derivedClass"
// End of class wizard stuff,
In my FormViewClass .cpp file I have the following code
nIndex = m_FormListBoxObj.AddString(str); and if I hold my cursore over the
varible m_FormListBoxObj it says the following
DerivedClass FormViewClass : : ListBoxObj
which means the m_FormListBoxObj is a (exactly what ? ) of CTry_1View class
but it is ( being handled ??? ) by a function in DerivedClass class.
In other words I have this code working and I understand what I did to create it but as
far as C++ goes I don't really understand what it all is.