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

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 )

Parameters

class_name

The actual name of the class.

base_class_name

The name of the base class.

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.

/* CAge.h */
class CAge : public CObject
{
     int num;
public:
     DECLARE_DYNAMIC(CAge)
};

//==============
/* CAge.cpp */
#include "stdafx.h"
#include "CAge.h"

IMPLEMENT_DYNAMIC(CAge, CObject) 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.