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.

77 lines
1.8 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 2000
  6. //
  7. // File: cpuiele.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef __CONTROLPANEL_UIELEMENT_H
  11. #define __CONTROLPANEL_UIELEMENT_H
  12. #include <cowsite.h>
  13. #include "cpaction.h"
  14. namespace CPL {
  15. //
  16. // Extension of IUICommand to include the activation of a context menu and
  17. // passing of an IShellBrowser ptr for command invocation.
  18. //
  19. class ICpUiCommand : public IUnknown
  20. {
  21. public:
  22. STDMETHOD(InvokeContextMenu)(HWND hwndParent, const POINT *ppt) PURE;
  23. STDMETHOD(Invoke)(HWND hwndParent, IUnknown *punkSite) PURE;
  24. STDMETHOD(GetDataObject)(IDataObject **ppdtobj) PURE;
  25. };
  26. //
  27. // Internal interface for obtaining element information.
  28. // Very similar to IUIElementInfo but returns the actual display
  29. // information rather than a resource identifier string. Used internally
  30. // only by the Control Panel code.
  31. //
  32. class ICpUiElementInfo : public IUnknown
  33. {
  34. public:
  35. STDMETHOD(LoadIcon)(eCPIMGSIZE eSize, HICON *phIcon) PURE;
  36. STDMETHOD(LoadName)(LPWSTR *ppszName) PURE;
  37. STDMETHOD(LoadTooltip)(LPWSTR *ppszTooltip) PURE;
  38. };
  39. HRESULT
  40. Create_CplUiElement(
  41. LPCWSTR pszName,
  42. LPCWSTR pszInfotip,
  43. LPCWSTR pszIcon,
  44. REFIID riid,
  45. void **ppvOut);
  46. HRESULT
  47. Create_CplUiCommand(
  48. LPCWSTR pszName,
  49. LPCWSTR pszInfotip,
  50. LPCWSTR pszIcon,
  51. const IAction *pAction,
  52. REFIID riid,
  53. void **ppvOut);
  54. HRESULT
  55. Create_CplUiCommandOnPidl(
  56. LPCITEMIDLIST pidl,
  57. REFIID riid,
  58. void **ppvOut);
  59. } // namespace CPL
  60. #endif //__CONTROLPANEL_UIELEMENT_H