DECLARE_DYNCREATE/DECLARE_DYNAMIC??
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
I have a question: what is the difference bettwen DECLARE_DYNCREATE(CCtrlView) and DECLARE_DYNAMIC(CView). when and where to use them? thanks
Both macros are adding the ability to query runtime information with CObject::IsKindOf for the classes. But only classes declared with DECLARE_DYNCREATE are enabled to be created by CRuntimeClass::CreateObject. Normally all views used inside the "MFC-Document-View-Architecture" were created by the framework by a call to CRuntimeClass::CreateObject. Hope this helps. Best regards Holger Persch