virtual CRuntimeClass* GetRuntimeClass( ) const;
Return Value
A pointer to the CRuntimeClass structure corresponding to this object’s class; never NULL.
Remarks
There is one CRuntimeClass structure for each CObject-derived class. The structure members are as follows:
Feature Only in Professional and Enterprise Editions Static linking to MFC is supported only in Visual C++ Professional and Enterprise Editions. For more information, see Visual C++ Editions.
This function requires use of the IMPLEMENT_DYNAMIC or IMPLEMENT_SERIAL macro in the class implementation. You will get incorrect results otherwise.
Example
See CObList::CObList for a listing of the CAge
class used in all CObject examples.
// example for CObject::GetRuntimeClass
CAge a(21);
CRuntimeClass* prt = a.GetRuntimeClass();
ASSERT( strcmp( prt->m_lpszClassName, "CAge" ) == 0 );
CObject Overview | Class Members | Hierarchy Chart
See Also CObject::IsKindOf, RUNTIME_CLASS