Share via


DECLARE_DYNCREATE

Use 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.

Add the DECLARE_DYNCREATE macro in the .H module for the class, then include that module in all .CPP modules that need access to objects of this class.

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

DECLARE_DYNCREATE(
class_name ); 

Parameters

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

Example

See the example for IMPLEMENT_DYNCREATE.

Requirements

**  Windows CE versions:** 2.0 and later
  Header file: Declared in Afx.h
  Platform: H/PC Pro, Palms-size PC, Pocket PC

See Also

IMPLEMENT_DYNCREATE, DECLARE_SERIAL, RUNTIME_CLASS, CObject::IsKindOf