Thursday, February 25, 2010

Base class of MFC

CObject:


   CObject is the base class of the Microsoft Foundation Class Library.  It support some features of our progarm objects, thats are

1) Serialization support

2) Run-time class information

3) Object diagnostic output

4) Compatibility with collection classes

  CObject does not support multiple inheritance. Our derived class can have only one CObject base class and that CObject must be left most in the hierarchy.

Optional macros in our classes:

First level macro

DECLARE_DYNAMIC and IMPLEMENT_DYNAMIC. It permits run time access to the class name and its position in the hierarchy.

Second level macro

DECLARE_SERIAL and IMPLEMENT_SERIAL, include all the functionality of the first-level macros, and they enable an object to be "serialized" to and from an "archive."


No comments:

Post a Comment