CObject is the root base class for most of the Microsoft Foundation Class Library (MFC). The CObject class contains many useful features that you may want to incorporate into your own program objects, including serialization support, run-time class information, and object diagnostic output. If you derive your class from CObject, your class can exploit these CObject features.
What do you want to do?
- Derive a class from CObject
- Add support for run-time class information, dynamic creation, and serialization to my derived class
- Access run-time class information
- Create objects dynamically
- Dump the object's data for diagnostic purposes
- Validate the object's internal state (see MFC ASSERT_VALID and CObject::AssertValid)
- Have the class serialize itself to persistent storage
- See a list of CObject Frequently Asked Questions