I'm not sure what AddTemplateInfo()
does, it does not seem to be a standard MFC function.
To get the name of the class, you could use something like:
CRuntimeClass *pClass = pDoc->GetRuntimeClass();
if (pClass != NULL)
TRACE(_T("Document class = %S\n"), pClass->m_lpszClassName);
NOTE: m_lpszClassName
is ASCII (LPCSTR
) and the code above assumes your project is based on Unicode -- otherwise, change %S
to %s
.