다음을 통해 공유


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

참고 항목

참조

DECLARE_DYNAMIC

DECLARE_DYNCREATE

DECLARE_SERIAL

CObject::GetRuntimeClass

CRuntimeClass 구조체

개념

MFC 매크로 및 전역