자네, 이제 슬슬 먹고 살아야 할 걱정을 해야 할 때가 아닌가? 어억... 이상하게 이미지랑 매칭되네.. ㅈㅅㅈㅅ
by lipprince

[MSDN - VC6.0] IMPLEMENT_DYNCREATE
 

IMPLEMENT_DYNCREATE

IMPLEMENT_DYNCREATE( class_name, base_class_name )

Parameters

class_name

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

base_class_name

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

Remarks

Use the IMPLEMENT_DYNCREATE macro with the DECLARE_DYNCREATE macro to enable objects of CObject-derived classes to be created dynamically at run time. The framework uses this ability to create new objects dynamically, for example, when it reads an object from disk during serialization. Add the IMPLEMENT_DYNCREATE macro in the class implementation file. For more information, seeCObject Class Topics in Visual C++ Programmer’s Guide.

If you use the DECLARE_DYNCREATE and IMPLEMENT_DYNCREATE macros, you can then use the RUNTIME_CLASS macro and the CObject::IsKindOf member function to determine the class of your objects at run time.

If DECLARE_DYNCREATE is included in the class declaration, then IMPLEMENT_DYNCREATE must be included in the class implementation.

Example

// CAge.hclass CAge : public CObject{     int num;public:     DECLARE_DYNCREATE(CAge)};//==============// CAge.cpp#include "stdafx.h"#include "CAge.h"IMPLEMENT_DYNCREATE(CAge, CObject) 

See Also   DECLARE_DYNCREATE, RUNTIME_CLASS, CObject::IsKindOf

by mindgear | 2008/04/22 17:48 | MSDN | 트랙백
트랙백 주소 : http://lipprince.egloos.com/tb/267069
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]
※ 로그인 사용자만 덧글을 남길 수 있습니다.
◀ 이전 페이지 다음 페이지 ▶
카테고리
잡다한 일상
Project
MFC
API
MSDN
Python
Tool
기타등등

최근 등록된 덧글

최근 등록된 트랙백

이전 블로그
more...

이글루 링크


rss

skin by black