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.
Header file: | Afx.h |
Platforms: | H/PC 2.0, Palm-size PC, H/PC Pro |
Windows CE versions: | 1.0 and later |
Complete documentation: | Visual C++ documentation |
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;
};
CObject::GetRuntimeClass, CObject::IsKindOf, Run-Time Object Model Support