If you're using the VS08 MFC ActiveX template, you might see a snippet like this in your control's .h file (within the class declaration, it's protected):
afx_msg void AboutBox();
DECLARE_DISPATCH_MAP()
And one like this in the .cpp file:
// Dispatch map
BEGIN_DISPATCH_MAP(CActiveXOutlookCtrl, COleControl)
DISP_FUNCTION_ID(yourCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
END_DISPATCH_MAP()
I've never had to use this, but this is your dispatch interface - aka the methods on your object others can call. What it means:
- "AboutBox" is the name they use to call it.
- DISPID_ABOUTBOX is an integer id for the function (I think it's arbitrary. I'd use a positive number because a lot of negatives are taken by default).
- AboutBox is the method name.
- VT_EMPTY is the method's return type.
- VTS_NONE is the type of params it takes.
There's also DECLARE_MESSAGE_MAP() and DECLARE_EVENT_MAP() though, which might be about what you want also.