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.

79 lines
2.0 KiB

  1. /*++
  2. Module Name:
  3. AddToDfs.cpp
  4. Abstract:
  5. This module contains the declaration of the CAddRep.
  6. This class displays the Add Replica Dialog,which is used to add new Replica.
  7. */
  8. #ifndef __ADDREP_H_
  9. #define __ADDREP_H_
  10. #include "resource.h" // main symbols
  11. #include "DfsEnums.h"
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CAddRep
  14. class CAddRep :
  15. public CDialogImpl<CAddRep>
  16. {
  17. public:
  18. CAddRep();
  19. ~CAddRep();
  20. enum { IDD = IDD_ADDREP };
  21. typedef enum REPLICATION_TYPE
  22. {
  23. REPLICATION_UNASSIGNED = 0,
  24. NO_REPLICATION,
  25. NORMAL_REPLICATION,
  26. STAGED_REPLICATION,
  27. IMMEDIATE_REPLICATION
  28. };
  29. BEGIN_MSG_MAP(CAddRep)
  30. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  31. MESSAGE_HANDLER(WM_HELP, OnCtxHelp)
  32. MESSAGE_HANDLER(WM_CONTEXTMENU, OnCtxMenuHelp)
  33. COMMAND_ID_HANDLER(IDOK, OnOK)
  34. COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  35. COMMAND_ID_HANDLER(IDC_BUTTONNETBROWSE, OnNetBrowse)
  36. END_MSG_MAP()
  37. // Command Handlers
  38. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  39. LRESULT OnCtxHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  40. LRESULT OnCtxMenuHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  41. LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  42. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  43. LRESULT OnNetBrowse(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  44. // Methods to access data in the dialog.
  45. HRESULT put_EntryPath(BSTR i_bstrParent);
  46. HRESULT get_NetPath(BSTR *o_bstrNetPath);
  47. HRESULT get_Server(BSTR *o_bstrServer);
  48. HRESULT get_Share(BSTR *o_bstrShare);
  49. REPLICATION_TYPE get_ReplicationType(VOID);
  50. // Method to specify Dfs type.
  51. void put_DfsType(DFS_TYPE i_DfsType)
  52. {
  53. m_DfsType = i_DfsType;
  54. }
  55. protected:
  56. CComBSTR m_BrowseNetLabel;
  57. CComBSTR m_bstrEntryPath;
  58. CComBSTR m_bstrNetPath;
  59. CComBSTR m_bstrServer;
  60. CComBSTR m_bstrShare;
  61. REPLICATION_TYPE m_RepType;
  62. DFS_TYPE m_DfsType;
  63. };
  64. #endif //__ADDREP_H_