[added microsoft.public.vc.mfc]
Post by RAGHUI am new to MFC
You may want to consider microsoft.public.vc.mfc newsgroup for MFC
questions.
Post by RAGHUMy question is why is CARCHIVE class not derived from COBJECT class
There are several classes in MFC that are not derived from CObject, as you
can read from the following diagram:
http://msdn.microsoft.com/en-us/library/ws8s10w4(VS.80).aspx
Classes like CArchive (or CDumpContext) are kind of "helper classes" for
CObject: they are *used* by CObject for some features like e.g.
serialization (CArchive), or run-time type information (CRuntimeClass), etc.
When you have an hineritance relation, you may think of it as a "Is-A" kind
of relation. So, if CArchive had been derived from CObject, it would have
meant something like "CArchive *Is-A* CObject". But this does not reflect
the nature of CArchive, which is not a CObject, but is just an *helper class
used by* CObject. CArchive is a "tool" that CObject uses to offer some
features (like serialization support).
HTH,
Giovanni