Has anyone else had to wrap the ActiveX control in an ATL class?
I have this working with the exception of the Event Sink.
Not sure what I am doing wrong.
...
BEGIN_SINK_MAP(CPdfMainWindow)
//Make sure the Event Handlers have __stdcall calling convention
SINK_ENTRY_EX(1, __uuidof(_IPDFCreactiveXEvents),0x00000001, BeforeDelete)
SINK_ENTRY_EX(1, __uuidof(_IPDFCreactiveXEvents),0x00000005, Refresh)
END_SINK_MAP()
// Event Handler for Mouse Move
void __stdcall BeforeDelete(long * Continue)
{
::MessageBox(NULL,"BeforeDelete","TEST",MB_OK);
return S_OK;
}
HRESULT __stdcall Refresh()
{
::MessageBox(NULL,"Refresh","TEST",MB_OK);
return S_OK;
}
...
Any help would be appreciated.
Events and ATL ActivceX wrapper class
ok for anyone interested, I had the major version of the control wrong in my class specification:
class CPdfMainWindow : public CWindowImpl<CPdfMainWindow, CWindow, CControlWinTraits >,
public IDispEventImpl<1, CPdfMainWindow, &__uuidof(_IPDFCreactiveXEvents), &__uuidof(__ACPDFCREACTIVEX), 2, 0>
was ... , 7, 0> hence my error.
thanks.
class CPdfMainWindow : public CWindowImpl<CPdfMainWindow, CWindow, CControlWinTraits >,
public IDispEventImpl<1, CPdfMainWindow, &__uuidof(_IPDFCreactiveXEvents), &__uuidof(__ACPDFCREACTIVEX), 2, 0>
was ... , 7, 0> hence my error.
thanks.