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.

65 lines
1.7 KiB

  1. /*++
  2. Module Name:
  3. MRoots.cpp
  4. Abstract:
  5. This module contains the declaration of the CMultiRoots.
  6. This class displays the Pick DFS Roots Dialog.
  7. */
  8. #ifndef __MROOTS_H_
  9. #define __MROOTS_H_
  10. #include "resource.h" // main symbols
  11. #include "DfsEnums.h"
  12. #include "netutils.h"
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CMultiRoots
  15. class CMultiRoots :
  16. public CDialogImpl<CMultiRoots>
  17. {
  18. public:
  19. CMultiRoots();
  20. ~CMultiRoots();
  21. enum { IDD = IDD_MROOTS };
  22. BEGIN_MSG_MAP(CMultiRoots)
  23. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  24. MESSAGE_HANDLER(WM_HELP, OnCtxHelp)
  25. MESSAGE_HANDLER(WM_CONTEXTMENU, OnCtxMenuHelp)
  26. COMMAND_ID_HANDLER(IDOK, OnOK)
  27. COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  28. END_MSG_MAP()
  29. // Command Handlers
  30. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  31. LRESULT OnCtxHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  32. LRESULT OnCtxMenuHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  33. LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  34. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  35. // Methods to access data in the dialog.
  36. HRESULT Init(BSTR i_bstrScope, ROOTINFOLIST *i_pRootList);
  37. HRESULT get_SelectedRootList(NETNAMELIST **o_ppSelectedRootList)
  38. {
  39. if (!o_ppSelectedRootList)
  40. return E_INVALIDARG;
  41. *o_ppSelectedRootList = &m_SelectedRootList;
  42. return S_OK;
  43. }
  44. protected:
  45. CComBSTR m_bstrScope;
  46. CComBSTR m_bstrText; // for IDC_MROOTS_TEXT
  47. ROOTINFOLIST* m_pRootList;
  48. NETNAMELIST m_SelectedRootList;
  49. };
  50. #endif //__MROOTS_H_