Hi everyone,
I'm with problems to receive an OCX event, the issue is this:
I have an OCX (mfc control) that have an Event declared on "public:" part of an class named CAlcUraCtrl like this:
//{{AFX_EVENT(CAlcUraCtrl)
void FireOnHangUp(long eCanal)
{FireEvent(eventidOnHangUp, EVENT_PARAM(VTS_I4), eCanal);}
//}}AFX_EVENT
and on my control.cpp source your declaration is:
BEGIN_EVENT_MAP(CAlcUraCtrl, COleControl)
//{{AFX_EVENT_MAP(CAlcUraCtrl)
EVENT_CUSTOM("OnHangUp", FireOnHangUp, VTS_I4)
//}}AFX_EVENT_MAP
END_EVENT_MAP()
and in .odl file is:
dispinterface _DAlcUraEvents
{
properties:
// Event interface has no properties
methods:
// NOTE - ClassWizard will maintain event information here.
// Use extreme caution when editing this section.
//{{AFX_ODL_EVENT(CAlcUraCtrl)
[id(1)] void OnHangUp(long eCanal);
//}}AFX_ODL_EVENT
};
When I compile and build is OK, I have no error or warnings. On VB when I load this OCX I found this events with no problems too, but they never are handled.
On my OCX source I do this to send the Event:
CAlcUraCtrl* FLH;
//
FLH = new CAlcUraCtrl;
FLH->FireOnHangUp(chdev);
//
delete FLH;
And I never receive the event on VB:
Private Sub CAlcUraCtrl1_OnHangUp(eCanal as Long)
Please tell I'm doing something wrong??? Because I'm a Beginner on VC++ and I'm to learning working ...
Very Thanks,
Danilo ...
I'm with problems to receive an OCX event, the issue is this:
I have an OCX (mfc control) that have an Event declared on "public:" part of an class named CAlcUraCtrl like this:
//{{AFX_EVENT(CAlcUraCtrl)
void FireOnHangUp(long eCanal)
{FireEvent(eventidOnHangUp, EVENT_PARAM(VTS_I4), eCanal);}
//}}AFX_EVENT
and on my control.cpp source your declaration is:
BEGIN_EVENT_MAP(CAlcUraCtrl, COleControl)
//{{AFX_EVENT_MAP(CAlcUraCtrl)
EVENT_CUSTOM("OnHangUp", FireOnHangUp, VTS_I4)
//}}AFX_EVENT_MAP
END_EVENT_MAP()
and in .odl file is:
dispinterface _DAlcUraEvents
{
properties:
// Event interface has no properties
methods:
// NOTE - ClassWizard will maintain event information here.
// Use extreme caution when editing this section.
//{{AFX_ODL_EVENT(CAlcUraCtrl)
[id(1)] void OnHangUp(long eCanal);
//}}AFX_ODL_EVENT
};
When I compile and build is OK, I have no error or warnings. On VB when I load this OCX I found this events with no problems too, but they never are handled.
On my OCX source I do this to send the Event:
CAlcUraCtrl* FLH;
//
FLH = new CAlcUraCtrl;
FLH->FireOnHangUp(chdev);
//
delete FLH;
And I never receive the event on VB:
Private Sub CAlcUraCtrl1_OnHangUp(eCanal as Long)
Please tell I'm doing something wrong??? Because I'm a Beginner on VC++ and I'm to learning working ...
Very Thanks,
Danilo ...