Leaked source code of windows server 2003
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.

76 lines
1.8 KiB

  1. /******************************************************************************
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. Behav_BODY.cpp
  5. Abstract:
  6. This file contains the implementation of the CPCHBehavior_BODY class,
  7. that dictates how hyperlinks work in the help center.
  8. Revision History:
  9. Davide Massarenti (dmassare) 06/06/2000
  10. created
  11. ******************************************************************************/
  12. #include "stdafx.h"
  13. #include <ShellApi.h>
  14. static const CPCHBehavior::EventDescription s_events[] =
  15. {
  16. { L"ondragstart", DISPID_HTMLELEMENTEVENTS_ONDRAGSTART },
  17. { NULL },
  18. };
  19. ////////////////////////////////////////////////////////////////////////////////
  20. CPCHBehavior_BODY::CPCHBehavior_BODY()
  21. {
  22. __HCP_FUNC_ENTRY( "CPCHBehavior_BODY::CPCHBehavior_BODY" );
  23. }
  24. /////////////////////////////////////////////////////////////////////////////
  25. STDMETHODIMP CPCHBehavior_BODY::Init( /*[in]*/ IElementBehaviorSite* pBehaviorSite )
  26. {
  27. __HCP_FUNC_ENTRY( "CPCHBehavior_BODY::Init" );
  28. HRESULT hr;
  29. __MPC_EXIT_IF_METHOD_FAILS(hr, CPCHBehavior::Init( pBehaviorSite ));
  30. __MPC_EXIT_IF_METHOD_FAILS(hr, AttachToEvents( s_events, (CLASS_METHOD)onEvent ));
  31. hr = S_OK;
  32. __HCP_FUNC_CLEANUP;
  33. __HCP_FUNC_EXIT(hr);
  34. }
  35. ////////////////////////////////////////////////////////////////////////////////
  36. HRESULT CPCHBehavior_BODY::onEvent( DISPID id, DISPPARAMS* pDispParams, VARIANT* pVarResult )
  37. {
  38. __HCP_FUNC_ENTRY( "CPCHBehavior_BODY::onEvent" );
  39. HRESULT hr;
  40. CComPtr<IHTMLEventObj> ev;
  41. __MPC_EXIT_IF_METHOD_FAILS(hr, GetEventObject( ev ));
  42. __MPC_EXIT_IF_METHOD_FAILS(hr, CancelEvent( ev ));
  43. hr = S_OK;
  44. __HCP_FUNC_CLEANUP;
  45. __HCP_FUNC_EXIT(hr);
  46. }