这是msdn里的注释,但是为什么要使用它不是很明白,希望能帮我解释一下
The framework uses this ability to create new objects dynamically, for example, when it reads an object from disk during serialization. Add the IMPLEMENT_DYNCREATE macro in the class implementation file. For more information, see CObject Class Topics.If you use the DECLARE_DYNCREATE and IMPLEMENT_DYNCREATE macros, you can then use the RUNTIME_CLASS macro and the CObject::IsKindOf member function to determine the class of your objects at run time. If DECLARE_DYNCREATE is included in the class declaration, then IMPLEMENT_DYNCREATE must be included in the class implementation.
The framework uses this ability to create new objects dynamically, for example, when it reads an object from disk during serialization. Add the IMPLEMENT_DYNCREATE macro in the class implementation file. For more information, see CObject Class Topics.If you use the DECLARE_DYNCREATE and IMPLEMENT_DYNCREATE macros, you can then use the RUNTIME_CLASS macro and the CObject::IsKindOf member function to determine the class of your objects at run time. If DECLARE_DYNCREATE is included in the class declaration, then IMPLEMENT_DYNCREATE must be included in the class implementation.
类库用它来动态创建对象,例如可以实现读取并创建一个存储在磁盘上的对象。使用方法:将IMPLEMENT_DYNCREATE宏加入到你的类实现文件中即可,更多信息请参考:CObject Class Topics如果你一起始用了DECLARE_DYNCREATE和IMPLEMENT_DYNCREATE宏,你就可以使用RUNTIME_CLASS宏和CObject类的IsKindOf成员函数以在运行时确定你的对象是由哪个类生成的。如果类声明中包含DECLARE_DYNCREATE,那么类的实现文件中必须包含IMPLEMENT_DYNCREATE。