请教《深入浅出MFC》中动态创建问题?
CRuntimeClass*PASCALCRuntimeClass::Load()#0035{#0036charszClassName[64];#0037CRuntime...
CRuntimeClass* PASCAL CRuntimeClass::Load()
#0035 {
#0036 char szClassName[64];
#0037 CRuntimeClass* pClass;
#0038
#0039 // JJHOU : instead of Load from file, we Load from cin.
#0040 cout << "enter a class name... ";
#0041 cin >> szClassName;
#0042
#0043 for (pClass = pFirstClass; pClass != NULL; pClass = pClass->m_pNextClass)
#0044 {
#0045 if (strcmp(szClassName, pClass->m_lpszClassName) == 0)
#0046 return pClass;
#0047 }
我知道pFirstClass是 static 对象,是CRunTime的共用指针,从NULL开始,我想问的是在整个动态创建过程中pFirstClass是怎么变化的,CObject下有好几条支线呢,我看不打懂啊,那个宏的基类到子类的排列对pFirstClass的变化有影响吗 展开
#0035 {
#0036 char szClassName[64];
#0037 CRuntimeClass* pClass;
#0038
#0039 // JJHOU : instead of Load from file, we Load from cin.
#0040 cout << "enter a class name... ";
#0041 cin >> szClassName;
#0042
#0043 for (pClass = pFirstClass; pClass != NULL; pClass = pClass->m_pNextClass)
#0044 {
#0045 if (strcmp(szClassName, pClass->m_lpszClassName) == 0)
#0046 return pClass;
#0047 }
我知道pFirstClass是 static 对象,是CRunTime的共用指针,从NULL开始,我想问的是在整个动态创建过程中pFirstClass是怎么变化的,CObject下有好几条支线呢,我看不打懂啊,那个宏的基类到子类的排列对pFirstClass的变化有影响吗 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询