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.

86 lines
2.0 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // CEditDirectory dialog
  3. class CEditDirectory
  4. {
  5. // Construction
  6. public:
  7. enum {
  8. APPPERM_NONE = 0,
  9. APPPERM_SCRIPTS,
  10. APPPERM_EXECUTE
  11. };
  12. CEditDirectory( HWND hParent = NULL ); // standard constructor
  13. ~CEditDirectory(); // standard destructor
  14. // tell the dialog to Close
  15. BOOL EndDialog( INT_PTR nResult ) { return ::EndDialog(m_hDlg,nResult);}
  16. // the the modal dialog to do its thing
  17. INT_PTR DoModal();
  18. BOOL OnMessage(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  19. // flag to indicate that this is a new item
  20. BOOL m_fNewItem;
  21. IMSAdminBase * m_pMBCom;
  22. HWND m_hDlg;
  23. HWND m_hEditAlias;
  24. HWND m_hEditPath;
  25. HWND m_hChkRead;
  26. HWND m_hChkWrite;
  27. HWND m_hChkDirBrowse;
  28. HWND m_hChkSource;
  29. HWND m_hRdoNone;
  30. HWND m_hRdoExecute;
  31. HWND m_hRdoScripts;
  32. TCHAR m_sz_alias[MAX_PATH];
  33. TCHAR m_sz_path[MAX_PATH];
  34. BOOL m_bool_read;
  35. BOOL m_bool_write;
  36. BOOL m_bool_dirbrowse;
  37. BOOL m_bool_source;
  38. INT m_int_AppPerms;
  39. // stored values for read/write/dir browse to use when unchecking full control
  40. BOOL m_bool_oldSource;
  41. // the root directory to use
  42. TCHAR m_szRoot[MAX_PATH];
  43. // Implementation
  44. protected:
  45. BOOL InitHandles( HWND hDlg );
  46. BOOL OnInitDialog( HWND hDlg );
  47. void OnOK( HWND hDlg );
  48. void OnRead( HWND hDlg );
  49. void OnWrite( HWND hDlg );
  50. void OnSource( HWND hDlg );
  51. void EnableSourceControl();
  52. int FindOneOf( LPTSTR psz, LPCTSTR pszSearch );
  53. int FindLastChr( LPTSTR psz, TCHAR ch );
  54. void TrimLeft( LPTSTR psz );
  55. void TrimRight( LPTSTR psz );
  56. // CDialog simulation routines
  57. void UpdateData( BOOL fDialogToData );
  58. // keep a copy of the original alias for later verification
  59. TCHAR m_szOrigAlias[MAX_PATH];
  60. // the parent window
  61. HWND m_hParent;
  62. };