Normally most of the MFC (window based classes) are derived from CObject.
What does CObject do?
Why some MFC classes are not required to be derived from CObject?
Normally most of the MFC (window based classes) are derived from CObject. What does
Share
According to MSDN
CObjectmainly provides these features:So when none of this is needed, there is no need to derive from
CObject.There a bit of overhead (
DECLARE/IMPLEMENENT_SERIAL/DYNAMICmacros) involved when deriving fromCObject, too, so there may be simpler ways of doing things than by deriving fromCObject.