CRuntimeClass

CRuntimeClass is a structure you can use to obtain information about an object or its base class at run time. The ability to determine the class of an object at run time is useful when extra type checking of function arguments is needed, or when you must write special-purpose code based on the class of an object. Each class derived from CObject is associated with a CRuntimeClass structure.

Syntax

struct CRuntimeClass
{
LPCSTR
m_lpszClassName;
int m_nObjectSize;
UINT
m_wSchema
CObject* (PASCAL* m_pfnCreateObject)( );
CRuntimeClass* (PASCAL*
m_pfnGetBaseClass)( );
CRuntimeClass*
m_pBaseClass;
CObject* CreateObject( );
BOOL IsDerivedFrom(const CRuntimeClass*
pBaseClass) const;
};

At a Glance

Header file: Afx.h
Platforms:
Versions: 1.0 and later
Complete documentation: Visual C++ documentation

See Also

Run-Time Object Model Support, CObject::GetRuntimeClass, CObject::IsKindOf