Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
TRY
Expand Minimize

RUNTIME_CLASS

Gets the run-time class structure from the name of a C++ class.

RUNTIME_CLASS(class_name )

class_name

The actual name of the class (not enclosed in quotation marks).

RUNTIME_CLASS returns a pointer to a CRuntimeClass structure for the class specified by class_name. Only CObject-derived classes declared with DECLARE_DYNAMIC, DECLARE_DYNCREATE, or DECLARE_SERIAL will return pointers to a CRuntimeClass structure.

For more information, see CObject Class Topics.

CRuntimeClass* prt = RUNTIME_CLASS(CAge);
ASSERT(strcmp(prt->m_lpszClassName, "CAge") == 0);   

Header: afx.h

Community Additions

ADD
Show:
© 2015 Microsoft