From: Joseph M. Newcomer on
See below...
On Sat, 20 Feb 2010 09:08:09 -0500, "RB" <NoMail(a)NoSpam> wrote:

>Congratulations on your MVP award and
>thank you for the very extensive and detailed reply.
>So in summation:
>A SuperClass is a base class
****
No, you didn't read carefully. A superclass is a class from which another class is
derived. A base class is typically a class which is NOT derived from any other class.

If I have the relationship
A->B->C

then
A is a base class
A is a superclass of B
A is a superclass of C

B is a subclass of A
B is a superclass of C

C is a subclass of B
C is a subclass of A

I would not call B a "base class".
*****
>and aSubClass is a derived class
>and a nested class is a Class inside of another class
>If I read your reply correctly these are just new words for old things
>
>And as to the MFC control category variable:
>
>>"Joseph M. Newcomer" wrote in message
>> The type is DerivedClass. The variable is an instance of DerivedClass.
>>The variable is a member of the FormViewClass.
>> ****
>
>(please correct me if I misunderstood you )
>So ..... the control category variable actually creates an instance of a Class object
>of the type ( DerivedClass ) ?
****
Yes. If I write
DerivedClass X;
then X is an instance of the class DerivedClass. Note that being an instance of a class
does not mean there is a window associated with the variable. Only later will the HWND be
created and attached to the object.
****
> (or the control Base class if you did not use a derived one)
>This is kinda what I felt it was doing in my gut, and is why I named it
>" m_FormListBoxObj " or is my gut still leading me to misunderstand your reply?
****
Yes, it is an instance of the object; What name you choose is based on your favorite
naming conventions. But it does represent an object instance.
joe
****
>
>>"Joseph M. Newcomer" wrote in message
>>>#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
>> ****
>> I wouldn't trust the browser as far as I could throw it. The declaration of the #include
>> is essential. if the browser acts strange, that is a bug. Report it.
>
>Ok I'm glad I do have that right since the sbrowser was making feel I had done something
>wrong. The sbrowser has always performed as expected in the past, I'm not sure reporting
>a bug would do any good since I use Visual C Pro. ver 6.0 which I doubt if they write fixes
>for it anymore. I did all the updates for it already. It has served me well over the years for
>what I do.
>
>and also
>
>>"Joseph M. Newcomer" wrote in message
>> I tend to assume that if Intellinonsense says something that makes no sense,
>> < cut out >So I wouldn't place much reliance on what it says.
>>
>> The variable DerivedClass is a member of the FormViewClass, but you have not indicated
>> what class the DerivedClass is derived from. So I don't know how to interpret the output.
>
>DerivedClass was from the base class of CListBox and so then ....
>
>> All you have is (reduced to essentials):
>> class DerivedClass : public SomeOtherClass {...};
>> class FormViewClass : public CFormView {
>> DerivedClass m_FormListBoxObj;
>
>Well if the DerivedClass is a member of the FormViewClass then ......
>Am I correct in ascertaining that the DerivedClass is nested inside of my FormViewClass ?
>so that in C++ it would be like FormViewClass : DerivedClass : m_FormListBoxObj ?
>
>I thank you again, and even if I misunderstood some of your excellent answers I believe
>I am of a better understanding and will now go back and read some bibliographies over
>again. RB
>
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: RB on
Oh ok , got it this time, the whole superclass and subclass thing is a replacement
for what I learned as Parent class and child class. But a Base class must be created
of it's own without any derived class input.
Thanks.

"Joseph M. Newcomer" <newcomer(a)flounder.com> wrote in message news:v440o5lct6bc5j64mre24brbqh2c1gsqcb(a)4ax.com...
> See below...
> On Sat, 20 Feb 2010 09:08:09 -0500, "RB" <NoMail(a)NoSpam> wrote:
>
>>Congratulations on your MVP award and
>>thank you for the very extensive and detailed reply.
>>So in summation:
>>A SuperClass is a base class
> ****
> No, you didn't read carefully. A superclass is a class from which another class is
> derived. A base class is typically a class which is NOT derived from any other class.
>
> If I have the relationship
> A->B->C
>
> then
> A is a base class
> A is a superclass of B
> A is a superclass of C
>
> B is a subclass of A
> B is a superclass of C
>
> C is a subclass of B
> C is a subclass of A
>
> I would not call B a "base class".
> *****
>>and aSubClass is a derived class
>>and a nested class is a Class inside of another class
>>If I read your reply correctly these are just new words for old things
>>
>>And as to the MFC control category variable:
>>
>>>"Joseph M. Newcomer" wrote in message
>>> The type is DerivedClass. The variable is an instance of DerivedClass.
>>>The variable is a member of the FormViewClass.
>>> ****
>>
>>(please correct me if I misunderstood you )
>>So ..... the control category variable actually creates an instance of a Class object
>>of the type ( DerivedClass ) ?
> ****
> Yes. If I write
> DerivedClass X;
> then X is an instance of the class DerivedClass. Note that being an instance of a class
> does not mean there is a window associated with the variable. Only later will the HWND be
> created and attached to the object.
> ****
>> (or the control Base class if you did not use a derived one)
>>This is kinda what I felt it was doing in my gut, and is why I named it
>>" m_FormListBoxObj " or is my gut still leading me to misunderstand your reply?
> ****
> Yes, it is an instance of the object; What name you choose is based on your favorite
> naming conventions. But it does represent an object instance.
> joe
> ****
>>
>>>"Joseph M. Newcomer" wrote in message
>>>>#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
>>> ****
>>> I wouldn't trust the browser as far as I could throw it. The declaration of the #include
>>> is essential. if the browser acts strange, that is a bug. Report it.
>>
>>Ok I'm glad I do have that right since the sbrowser was making feel I had done something
>>wrong. The sbrowser has always performed as expected in the past, I'm not sure reporting
>>a bug would do any good since I use Visual C Pro. ver 6.0 which I doubt if they write fixes
>>for it anymore. I did all the updates for it already. It has served me well over the years for
>>what I do.
>>
>>and also
>>
>>>"Joseph M. Newcomer" wrote in message
>>> I tend to assume that if Intellinonsense says something that makes no sense,
>>> < cut out >So I wouldn't place much reliance on what it says.
>>>
>>> The variable DerivedClass is a member of the FormViewClass, but you have not indicated
>>> what class the DerivedClass is derived from. So I don't know how to interpret the output.
>>
>>DerivedClass was from the base class of CListBox and so then ....
>>
>>> All you have is (reduced to essentials):
>>> class DerivedClass : public SomeOtherClass {...};
>>> class FormViewClass : public CFormView {
>>> DerivedClass m_FormListBoxObj;
>>
>>Well if the DerivedClass is a member of the FormViewClass then ......
>>Am I correct in ascertaining that the DerivedClass is nested inside of my FormViewClass ?
>>so that in C++ it would be like FormViewClass : DerivedClass : m_FormListBoxObj ?
>>
>>I thank you again, and even if I misunderstood some of your excellent answers I believe
>>I am of a better understanding and will now go back and read some bibliographies over
>>again. RB
>>
> Joseph M. Newcomer [MVP]
> email: newcomer(a)flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm


From: Joseph M. Newcomer on
The superclass/subclass is parent/child. Generally, we use the term "base class" to refer
to a class that is not derived from any other class. But the ClassWizard in VS will talk
about adding a class and ask you to designate a "base class", and will give options like
CStatic, which is really a subclass of CWnd, which is a subclass of CCmdTarget, which is a
subclass of CObject, which is the actual "base" class not derived from anything. So the
term is a bit looser in its definition.
joe

On Sat, 20 Feb 2010 18:47:54 -0500, "RB" <NoMail(a)NoSpam> wrote:

>Oh ok , got it this time, the whole superclass and subclass thing is a replacement
>for what I learned as Parent class and child class. But a Base class must be created
>of it's own without any derived class input.
>Thanks.
>
>"Joseph M. Newcomer" <newcomer(a)flounder.com> wrote in message news:v440o5lct6bc5j64mre24brbqh2c1gsqcb(a)4ax.com...
>> See below...
>> On Sat, 20 Feb 2010 09:08:09 -0500, "RB" <NoMail(a)NoSpam> wrote:
>>
>>>Congratulations on your MVP award and
>>>thank you for the very extensive and detailed reply.
>>>So in summation:
>>>A SuperClass is a base class
>> ****
>> No, you didn't read carefully. A superclass is a class from which another class is
>> derived. A base class is typically a class which is NOT derived from any other class.
>>
>> If I have the relationship
>> A->B->C
>>
>> then
>> A is a base class
>> A is a superclass of B
>> A is a superclass of C
>>
>> B is a subclass of A
>> B is a superclass of C
>>
>> C is a subclass of B
>> C is a subclass of A
>>
>> I would not call B a "base class".
>> *****
>>>and aSubClass is a derived class
>>>and a nested class is a Class inside of another class
>>>If I read your reply correctly these are just new words for old things
>>>
>>>And as to the MFC control category variable:
>>>
>>>>"Joseph M. Newcomer" wrote in message
>>>> The type is DerivedClass. The variable is an instance of DerivedClass.
>>>>The variable is a member of the FormViewClass.
>>>> ****
>>>
>>>(please correct me if I misunderstood you )
>>>So ..... the control category variable actually creates an instance of a Class object
>>>of the type ( DerivedClass ) ?
>> ****
>> Yes. If I write
>> DerivedClass X;
>> then X is an instance of the class DerivedClass. Note that being an instance of a class
>> does not mean there is a window associated with the variable. Only later will the HWND be
>> created and attached to the object.
>> ****
>>> (or the control Base class if you did not use a derived one)
>>>This is kinda what I felt it was doing in my gut, and is why I named it
>>>" m_FormListBoxObj " or is my gut still leading me to misunderstand your reply?
>> ****
>> Yes, it is an instance of the object; What name you choose is based on your favorite
>> naming conventions. But it does represent an object instance.
>> joe
>> ****
>>>
>>>>"Joseph M. Newcomer" wrote in message
>>>>>#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
>>>> ****
>>>> I wouldn't trust the browser as far as I could throw it. The declaration of the #include
>>>> is essential. if the browser acts strange, that is a bug. Report it.
>>>
>>>Ok I'm glad I do have that right since the sbrowser was making feel I had done something
>>>wrong. The sbrowser has always performed as expected in the past, I'm not sure reporting
>>>a bug would do any good since I use Visual C Pro. ver 6.0 which I doubt if they write fixes
>>>for it anymore. I did all the updates for it already. It has served me well over the years for
>>>what I do.
>>>
>>>and also
>>>
>>>>"Joseph M. Newcomer" wrote in message
>>>> I tend to assume that if Intellinonsense says something that makes no sense,
>>>> < cut out >So I wouldn't place much reliance on what it says.
>>>>
>>>> The variable DerivedClass is a member of the FormViewClass, but you have not indicated
>>>> what class the DerivedClass is derived from. So I don't know how to interpret the output.
>>>
>>>DerivedClass was from the base class of CListBox and so then ....
>>>
>>>> All you have is (reduced to essentials):
>>>> class DerivedClass : public SomeOtherClass {...};
>>>> class FormViewClass : public CFormView {
>>>> DerivedClass m_FormListBoxObj;
>>>
>>>Well if the DerivedClass is a member of the FormViewClass then ......
>>>Am I correct in ascertaining that the DerivedClass is nested inside of my FormViewClass ?
>>>so that in C++ it would be like FormViewClass : DerivedClass : m_FormListBoxObj ?
>>>
>>>I thank you again, and even if I misunderstood some of your excellent answers I believe
>>>I am of a better understanding and will now go back and read some bibliographies over
>>>again. RB
>>>
>> Joseph M. Newcomer [MVP]
>> email: newcomer(a)flounder.com
>> Web: http://www.flounder.com
>> MVP Tips: http://www.flounder.com/mvp_tips.htm
>
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm