DECLARE_DISPATCH_MAP( )
Remarks
If a CCmdTarget-derived class in your program supports OLE Automation, that class must provide a dispatch map to expose its methods and properties. Use the DECLARE_DISPATCH_MAP macro at the end of your class declaration. Then, in the .CPP file that defines the member functions for the class, use the BEGIN_DISPATCH_MAP macro. Then include macro entries for each of your class’s exposed methods and properties (DISP_FUNCTION, DISP_PROPERTY, and so on). Finally, use the END_DISPATCH_MAP macro.
Note If you declare any members after DECLARE_DISPATCH_MAP, you must specify a new access type (public, private, or protected) for them.
AppWizard and ClassWizard assist in creating Automation classes and in maintaining dispatch maps: see the articles on AppWizard and ClassWizard: Automation Support. For more information on dispatch maps, see Automation Servers. All of these articles are in Visual C++ Programmer’s Guide.
Example
// example for DECLARE_DISPATCH_MAP
class CMyDoc : public CDocument
{
// Member declarations
DECLARE_DISPATCH_MAP()
};
See Also Dispatch Maps, BEGIN_DISPATCH_MAP, END_DISPATCH_MAP, DISP_FUNCTION, DISP_PROPERTY, DISP_PROPERTY_EX, DISP_DEFVALUE