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.

82 lines
2.2 KiB

  1. // EditAlias.h : Declaration of the CEditAlias
  2. #ifndef __EDITALIAS_H_
  3. #define __EDITALIAS_H_
  4. #include "resource.h" // main symbols
  5. #include "common.h"
  6. // These constants depend on dialog layout
  7. #define APP_PERM_NONE 0
  8. #define APP_PERM_EXECUTE 1
  9. #define APP_PERM_SCRIPTS 2
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CEditAlias
  12. class CEditAlias :
  13. public CDialogImpl<CEditAlias>,
  14. public CWinDataExchange<CEditAlias>
  15. {
  16. public:
  17. CEditAlias() :
  18. m_read(FALSE),
  19. m_write(FALSE),
  20. m_source(FALSE),
  21. m_browse(FALSE),
  22. m_appcontrol(APP_PERM_NONE),
  23. m_pRootKey(NULL)
  24. {
  25. }
  26. ~CEditAlias()
  27. {
  28. }
  29. enum { IDD = IDD_EDIT_ALIAS };
  30. BEGIN_MSG_MAP_EX(CEditAlias)
  31. MSG_WM_INITDIALOG(OnInitDialog)
  32. COMMAND_ID_HANDLER_EX(IDOK, OnOK)
  33. COMMAND_ID_HANDLER_EX(IDCANCEL, OnCancel)
  34. // COMMAND_ID_HANDLER_EX(IDC_READ, OnPermissions)
  35. COMMAND_ID_HANDLER_EX(IDC_WRITE, OnPermissions)
  36. // COMMAND_ID_HANDLER_EX(IDC_FULLCONTROL, OnPermissions)
  37. // COMMAND_ID_HANDLER_EX(IDC_DIRBROWSE, OnPermissions)
  38. COMMAND_ID_HANDLER_EX(IDC_SCRIPTS_PERMS, OnPermissions)
  39. COMMAND_ID_HANDLER_EX(IDC_EXECUTE_PERMS, OnPermissions)
  40. COMMAND_HANDLER_EX(IDC_ALIAS, EN_CHANGE, OnAliasChange)
  41. END_MSG_MAP()
  42. LRESULT OnInitDialog(HWND hDlg, LPARAM lParam);
  43. void OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl);
  44. void OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl);
  45. void OnPermissions(WORD wNotifyCode, WORD wID, HWND hWndCtrl);
  46. void OnAccess(WORD wNotifyCode, WORD wID, HWND hWndCtrl);
  47. void OnAliasChange(WORD wNotifyCode, WORD wID, HWND hWndCtl);
  48. BEGIN_DDX_MAP(CEditAlias)
  49. DDX_TEXT(IDC_PATH, m_path)
  50. DDX_TEXT(IDC_ALIAS, m_alias)
  51. DDX_CHECK(IDC_READ, m_read)
  52. DDX_CHECK(IDC_WRITE, m_write)
  53. DDX_CHECK(IDC_FULLCONTROL, m_source)
  54. DDX_CHECK(IDC_DIRBROWSE, m_browse)
  55. DDX_RADIO(IDC_NONE_PERMS, m_appcontrol)
  56. END_DDX_MAP()
  57. TCHAR m_path[MAX_PATH], m_alias[MAX_PATH];
  58. CString m_prev_alias;
  59. // CMetabasePath m_root;
  60. CString m_instance;
  61. BOOL m_read,
  62. m_write,
  63. m_source,
  64. m_browse,
  65. m_appcontrol,
  66. m_new;
  67. BOOL m_in_init;
  68. // CToolTipCtrl m_tool_tip;
  69. CMetaKey * m_pRootKey;
  70. };
  71. #endif //__EDITALIAS_H_