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.

80 lines
2.3 KiB

  1. //==============================================================;
  2. //
  3. // This source code is only intended as a supplement to existing Microsoft documentation.
  4. //
  5. //
  6. //
  7. //
  8. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  9. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  10. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  11. // PURPOSE.
  12. //
  13. // Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  14. //
  15. //
  16. //
  17. //==============================================================;
  18. #ifndef _CToolBarExtension_H_
  19. #define _CToolBarExtension_H_
  20. #include <tchar.h>
  21. #include <mmc.h>
  22. class CToolBarExtension : public IExtendControlbar
  23. {
  24. private:
  25. ULONG m_cref;
  26. IControlbar* m_ipControlBar;
  27. IToolbar* m_ipToolbar;
  28. enum STATUS {RUNNING, PAUSED, STOPPED} iStatus;
  29. HRESULT ExtractObjectTypeGUID( IDataObject* piDataObject, GUID* pguidObjectType );
  30. HRESULT ExtractSnapInCLSID( IDataObject* piDataObject, CLSID* pclsidSnapin );
  31. HRESULT ExtractString( IDataObject *piDataObject,CLIPFORMAT cfClipFormat, WCHAR *pstr, DWORD cchMaxLength);
  32. HRESULT ExtractData( IDataObject *piDataObject,CLIPFORMAT cfClipFormat, BYTE *pbData, DWORD cbData );
  33. HRESULT SetToolbarButtons(STATUS iVehicleStatus);
  34. // clipboard format
  35. static UINT s_cfDisplayName;
  36. static UINT s_cfSnapInCLSID;
  37. static UINT s_cfNodeType;
  38. public:
  39. CToolBarExtension();
  40. ~CToolBarExtension();
  41. ///////////////////////////////
  42. // Interface IUnknown
  43. ///////////////////////////////
  44. STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppv);
  45. STDMETHODIMP_(ULONG) AddRef();
  46. STDMETHODIMP_(ULONG) Release();
  47. ///////////////////////////////
  48. // Interface IExtendControlBar
  49. ///////////////////////////////
  50. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetControlbar(
  51. /* [in] */ LPCONTROLBAR pControlbar);
  52. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE ControlbarNotify(
  53. /* [in] */ MMC_NOTIFY_TYPE event,
  54. /* [in] */ LPARAM arg,
  55. /* [in] */ LPARAM param);
  56. public:
  57. IToolbar *getToolbar() { return m_ipToolbar; }
  58. };
  59. #endif _CToolBarExtension_H_