Share via


IMPLEMENT_DYNAMIC

Generates the C++ code necessary for a dynamic CObject-derived class with run-time access to the class name and position within the hierarchy.

IMPLEMENT_DYNAMIC(class_name, base_class_name )

매개 변수

  • class_name
    The actual name of the class.

  • base_class_name
    기본 클래스의 이름입니다.

설명

Use the IMPLEMENT_DYNAMIC macro in a .cpp module, and then link the resulting object code only once.

For more information, see CObject Class Topics.

예제

class CPerson : public CObject 
{
   DECLARE_DYNAMIC( CPerson )

   // other declarations
};
IMPLEMENT_DYNAMIC( CPerson, CObject )

요구 사항

Header: afx.h

참고 항목

참조

DECLARE_DYNAMIC

RUNTIME_CLASS

CObject::IsKindOf

개념

MFC 매크로 및 전역