Export (0) Print
Expand All
TRY
Expand Minimize
0 out of 2 rated this helpful - Rate this topic

RUNTIME_CLASS

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

RUNTIME_CLASS(class_name )

Parameter

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

Remarks

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.

Example

// Example for RUNTIME_CLASS
CRuntimeClass* prt = RUNTIME_CLASS( CAge );
ASSERT( lstrcmp( prt->m_lpszClassName, "CAge" )  == 0 );

See Also

MFC Macros and Globals | DECLARE_DYNAMIC | DECLARE_DYNCREATE | DECLARE_SERIAL | CObject::GetRuntimeClass | CRuntimeClass

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.