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.

169 lines
2.4 KiB

  1. /*++
  2. Copyright (c) 1994-1998 Microsoft Corporation
  3. Module Name :
  4. basdom.cpp
  5. Abstract:
  6. Basic Domain Dialog
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Project:
  10. Internet Services Manager
  11. Revision History:
  12. --*/
  13. //
  14. // Include Files
  15. //
  16. #include "stdafx.h"
  17. #include "w3scfg.h"
  18. #include "basdom.h"
  19. #ifdef _DEBUG
  20. #define new DEBUG_NEW
  21. #undef THIS_FILE
  22. static char THIS_FILE[] = __FILE__;
  23. #endif
  24. CBasDomainDlg::CBasDomainDlg(
  25. IN LPCTSTR lpstrDomainName,
  26. IN CWnd * pParent OPTIONAL
  27. )
  28. /*++
  29. Routine Description:
  30. Constructor
  31. Arguments:
  32. LPCTSTR lpstrDomainName : Initialial domain name
  33. CWnd * pParent : Parent window or NULL
  34. Return Value:
  35. N/A
  36. --*/
  37. : CDialog(CBasDomainDlg::IDD, pParent),
  38. m_strBasDomain(lpstrDomainName)
  39. {
  40. #if 0 // Keep class wizard happy
  41. //{{AFX_DATA_INIT(CBasDomainDlg)
  42. m_strBasDomain = lpstrDomainName;
  43. //}}AFX_DATA_INIT
  44. #endif // 0
  45. }
  46. void
  47. CBasDomainDlg::DoDataExchange(
  48. IN CDataExchange * pDX
  49. )
  50. /*++
  51. Routine Description:
  52. Initialise/Store control data
  53. Arguments:
  54. CDataExchange * pDX - DDX/DDV control structure
  55. Return Value:
  56. None
  57. --*/
  58. {
  59. CDialog::DoDataExchange(pDX);
  60. //{{AFX_DATA_MAP(CBasDomainDlg)
  61. DDX_Control(pDX, IDC_EDIT_DOMAIN_NAME, m_edit_BasicDomain);
  62. DDX_Text(pDX, IDC_EDIT_DOMAIN_NAME, m_strBasDomain);
  63. //}}AFX_DATA_MAP
  64. }
  65. //
  66. // Message Map
  67. //
  68. BEGIN_MESSAGE_MAP(CBasDomainDlg, CDialog)
  69. //{{AFX_MSG_MAP(CBasDomainDlg)
  70. ON_BN_CLICKED(IDC_BUTTON_BROWSE, OnButtonBrowse)
  71. ON_BN_CLICKED(IDC_BUTTON_DEFAULT, OnButtonDefault)
  72. //}}AFX_MSG_MAP
  73. END_MESSAGE_MAP()
  74. //
  75. // Message Handlers
  76. //
  77. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  78. void
  79. CBasDomainDlg::OnButtonBrowse()
  80. /*++
  81. Routine Description:
  82. Browse for domains. Bring up browse dialog, and write the
  83. selection to the edit box.
  84. Arguments:
  85. None
  86. Return Value:
  87. None
  88. --*/
  89. {
  90. CBrowseDomainDlg dlgBrowse(this, m_strBasDomain);
  91. if (dlgBrowse.DoModal() == IDOK)
  92. {
  93. m_edit_BasicDomain.SetWindowText(
  94. dlgBrowse.GetSelectedDomain(m_strBasDomain)
  95. );
  96. }
  97. }
  98. void
  99. CBasDomainDlg::OnButtonDefault()
  100. /*++
  101. Routine Description:
  102. Default button is pressed. Revert to using the default
  103. button, i.e. clear the selected domain name.
  104. Arguments:
  105. None
  106. Return Value:
  107. None
  108. --*/
  109. {
  110. m_edit_BasicDomain.SetWindowText(_T(""));
  111. }