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.

49 lines
1.4 KiB

  1. //
  2. //
  3. //
  4. #pragma once
  5. #include "debug.h"
  6. enum {
  7. WF_PERUSER = 0x0001, // item is per user as opposed to per machine
  8. WF_ADMINONLY = 0x0002, // only show item if user is an admin
  9. WF_ALTERNATECOLOR = 0x1000, // show menu item text in the "visited" color
  10. WF_DISABLED = 0x2000, // Treated normally except cannot be launched
  11. };
  12. class CDataItem
  13. {
  14. public:
  15. CDataItem();
  16. ~CDataItem();
  17. TCHAR * GetTitle() { return m_pszTitle; }
  18. TCHAR * GetMenuName() { return m_pszMenuName?m_pszMenuName:m_pszTitle; }
  19. TCHAR * GetDescription(){ return m_pszDescription; }
  20. TCHAR GetAccel() { return m_chAccel; }
  21. int GetImgIndex() { return m_iImage; }
  22. BOOL SetData( LPTSTR szTitle, LPTSTR szMenu, LPTSTR szDesc, LPTSTR szCmd, LPTSTR szArgs, DWORD dwFlags, int iImgIndex );
  23. BOOL Invoke( HWND hwnd );
  24. // flags
  25. //
  26. // This var is a bit mask of the following values
  27. // PERUSER True if item must be completed on a per user basis
  28. // False if it's per machine
  29. // ADMINONLY True if this item can only be run by an admin
  30. // False if all users should do this
  31. DWORD m_dwFlags;
  32. protected:
  33. TCHAR * m_pszTitle;
  34. TCHAR * m_pszMenuName;
  35. TCHAR * m_pszDescription;
  36. TCHAR m_chAccel;
  37. int m_iImage;
  38. TCHAR * m_pszCmdLine;
  39. TCHAR * m_pszArgs;
  40. };