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.

56 lines
1.7 KiB

  1. /*--------------------------------------------------------------------------*
  2. *
  3. * Microsoft Windows
  4. * Copyright (C) Microsoft Corporation, 1992 - 000
  5. *
  6. * File: xmlicon.h
  7. *
  8. * Contents: Interface file for CXMLIcon
  9. *
  10. * History: 26-Jul-2000 jeffro Created
  11. *
  12. *--------------------------------------------------------------------------*/
  13. #pragma once
  14. #include "xmlbase.h" // for CXMLObject
  15. #include "smarticon.h" // for CSmartIcon
  16. /*+-------------------------------------------------------------------------*
  17. * class CXMLIcon
  18. *
  19. * This class adds XML persistence to CSmartIcons. CSmartIcon cannot
  20. * implement XML persistence on its own because it is used in the shell
  21. * extension. The shell extension must be extremely lightweight, but
  22. * XML persistence requires mmcbase.dll. Depending on mmcbase.dll would
  23. * make the shell extension too heavy, so we have this functionality split.
  24. *--------------------------------------------------------------------------*/
  25. class CXMLIcon :
  26. public CXMLObject,
  27. public CSmartIcon
  28. {
  29. public:
  30. CXMLIcon (LPCTSTR pszBinaryEntryName = NULL) :
  31. m_strBinaryEntryName ((pszBinaryEntryName != NULL) ? pszBinaryEntryName : _T(""))
  32. {}
  33. // default copy construction, copy assignment, and destruction are fine
  34. CXMLIcon& operator= (const CSmartIcon& other)
  35. {
  36. CSmartIcon::operator= (other);
  37. return (*this);
  38. }
  39. // CXMLObject methods
  40. public:
  41. virtual void Persist(CPersistor &persistor);
  42. virtual bool UsesBinaryStorage() { return (true); }
  43. virtual LPCTSTR GetBinaryEntryName();
  44. DEFINE_XML_TYPE(XML_TAG_CONSOLE_ICON);
  45. private:
  46. const tstring m_strBinaryEntryName;
  47. };