|
以下是_IMPLEMENT_RUNTIMECLASS(class_name, base_class_name, wSchema, pfnNew)的定义部分:
static char _lpsz##class_name[] = #class_name; \
CRuntimeClass class_name::class##class_name = { \
_lpsz##class_name, sizeof(class_name), wSchema, pfnNew, RUNTIME_CLASS(base_class_name), NULL }; \
static AFX_CLASSINIT _init_##class_name (class_name::class##class_name); \
CRuntimeClass* class_name::GetRuntimeClass() const \
{ return &class_name::class##class_name; } \
AFX_CLASSINIT::AFX_CLASSINIT(CRuntimeClass* pNewClass)
{
pNewClass->m_pNextClass = CRuntimeClass::pFirstClass;
CRuntimeClass::pFirstClass = pNewClass;
}
其中以下两句是什么意思啊,能起到什作用啊
static AFX_CLASSINIT _init_##class_name (class_name::class##class_name); \
CRuntimeClass* class_name::GetRuntimeClass() const \
{ return &class_name::class##class_name; }
小弟先谢过了
|
|