Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
911 B

  1. #pragma once
  2. #include "atlwin.h"
  3. class CSxApwHtmlEventSink : public IDispatch
  4. {
  5. public:
  6. STDMETHOD(GetTypeInfoCount)(UINT* pctinfo)
  7. {
  8. return E_NOTIMPL;
  9. }
  10. STDMETHOD(GetTypeInfo)(UINT itinfo, LCID lcid, ITypeInfo** pptinfo)
  11. {
  12. return E_NOTIMPL;
  13. }
  14. STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR* rgszNames, UINT cNames,
  15. LCID lcid, DISPID* rgdispid)
  16. {
  17. return E_NOTIMPL;
  18. }
  19. STDMETHOD(Invoke)(DISPID dispidMember, REFIID riid,
  20. LCID lcid, WORD wFlags, DISPPARAMS* pdispparams, VARIANT* pvarResult,
  21. EXCEPINFO* pexcepinfo, UINT* puArgErr)
  22. {
  23. HRESULT hr = S_OK;
  24. switch ( dispidMember )
  25. {
  26. case DISPID_HTMLELEMENTEVENTS2_ONCLICK:
  27. OnClick();
  28. default:
  29. /* add more as needed */
  30. break;
  31. }
  32. return hr;
  33. }
  34. virtual void OnClick() { }
  35. };