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.

39 lines
1.1 KiB

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