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.

60 lines
1.8 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: C M D T A B L E . H
  7. //
  8. // Contents: Command-table code -- determines which menu options are
  9. // available by the selection count, among other criteria
  10. //
  11. // Notes:
  12. //
  13. // Author: jeffspr 28 Jan 1998
  14. //
  15. //----------------------------------------------------------------------------
  16. #pragma once
  17. #ifndef _CMDTABLE_H_
  18. #define _CMDTABLE_H_
  19. struct CommandTableEntry
  20. {
  21. int iCommandId; // Associated command ID
  22. bool fValidOnZero; // Is this option valid when 0 items selected?
  23. bool fValidOnMultiple; // Is this option valid with > 1 selected?
  24. bool fValidOnSingle; // Is this option valid with == 1 selected?
  25. bool fNewState; // What's the new state? (work variable)
  26. };
  27. typedef CommandTableEntry COMMANDTABLEENTRY;
  28. typedef CommandTableEntry * PCOMMANDTABLEENTRY;
  29. extern COMMANDTABLEENTRY g_cteFolderCommands[];
  30. extern const DWORD g_nFolderCommandCount;
  31. struct CommandCheckEntry
  32. {
  33. int iCommandId; // Associated command ID
  34. bool fCurrentlyChecked; // Is this menu item already checked?
  35. bool fNewCheckState; // What's the new check state?
  36. };
  37. typedef CommandCheckEntry COMMANDCHECKENTRY;
  38. typedef CommandCheckEntry * PCOMMANDCHECKENTRY;
  39. extern COMMANDCHECKENTRY g_cceFolderCommands[];
  40. extern const DWORD g_nFolderCommandCheckCount;
  41. //---[ Prototypes ]-----------------------------------------------------------
  42. HRESULT HrEnableOrDisableMenuItems(
  43. HWND hwnd,
  44. LPCITEMIDLIST * apidlSelected,
  45. DWORD cPidl,
  46. HMENU hmenu,
  47. UINT idCmdFirst);
  48. #endif // _CMDTABLE_H_