Leaked source code of windows server 2003
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.

149 lines
4.3 KiB

  1. // gopgenp1.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ISAdmin.h"
  5. #include "compsdef.h"
  6. #include "gopgenp1.h"
  7. #include "gopadvp1.h"
  8. #ifdef _DEBUG
  9. #undef THIS_FILE
  10. static char BASED_CODE THIS_FILE[] = __FILE__;
  11. #endif
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CGOPGENP1 property page
  14. IMPLEMENT_DYNCREATE(CGOPGENP1, CGenPage)
  15. CGOPGENP1::CGOPGENP1() : CGenPage(CGOPGENP1::IDD)
  16. {
  17. //{{AFX_DATA_INIT(CGOPGENP1)
  18. // NOTE: the ClassWizard will add member initialization here
  19. //}}AFX_DATA_INIT
  20. }
  21. CGOPGENP1::~CGOPGENP1()
  22. {
  23. }
  24. void CGOPGENP1::DoDataExchange(CDataExchange* pDX)
  25. {
  26. CGenPage::DoDataExchange(pDX);
  27. //{{AFX_DATA_MAP(CGOPGENP1)
  28. DDX_Control(pDX, IDC_LOGANONDATA1, m_cboxLogAnon);
  29. DDX_Control(pDX, IDC_ENWAISDATA1, m_cboxEnWais);
  30. DDX_Control(pDX, IDC_ENSVCLOCDATA1, m_cboxEnSvcLoc);
  31. //}}AFX_DATA_MAP
  32. }
  33. BEGIN_MESSAGE_MAP(CGOPGENP1, CGenPage)
  34. //{{AFX_MSG_MAP(CGOPGENP1)
  35. ON_BN_CLICKED(IDC_ENSVCLOCDATA1, OnEnsvclocdata1)
  36. ON_BN_CLICKED(IDC_ENWAISDATA1, OnEnwaisdata1)
  37. ON_BN_CLICKED(IDC_LOGANONDATA1, OnLoganondata1)
  38. //}}AFX_MSG_MAP
  39. END_MESSAGE_MAP()
  40. /////////////////////////////////////////////////////////////////////////////
  41. // CGOPGENP1 message handlers
  42. BOOL CGOPGENP1::OnInitDialog()
  43. {
  44. int i;
  45. CGenPage::OnInitDialog();
  46. // TODO: Add extra initialization here
  47. for (i = 0; i < GopPage_TotalNumRegEntries; i++) {
  48. m_binNumericRegistryEntries[i].bIsChanged = FALSE;
  49. m_binNumericRegistryEntries[i].ulMultipleFactor = 1;
  50. }
  51. m_binNumericRegistryEntries[GopPage_EnableSvcLoc].strFieldName = _T(ENABLESVCLOCNAME);
  52. m_binNumericRegistryEntries[GopPage_EnableSvcLoc].ulDefaultValue = DEFAULTENABLESVCLOC;
  53. m_binNumericRegistryEntries[GopPage_LogAnonymous].strFieldName = _T(LOGANONYMOUSNAME);
  54. m_binNumericRegistryEntries[GopPage_LogAnonymous].ulDefaultValue = DEFAULTLOGANONYMOUS;
  55. m_binNumericRegistryEntries[GopPage_CheckForWAISDB].strFieldName = _T(CHECKFORWAISDBNAME);
  56. m_binNumericRegistryEntries[GopPage_CheckForWAISDB].ulDefaultValue = DEFAULTCHECKFORWAISDB;
  57. for (i = 0; i < GopPage_TotalNumRegEntries; i++) {
  58. if (m_rkMainKey->QueryValue(m_binNumericRegistryEntries[i].strFieldName,
  59. m_binNumericRegistryEntries[i].ulFieldValue) != ERROR_SUCCESS) {
  60. m_binNumericRegistryEntries[i].ulFieldValue = m_binNumericRegistryEntries[i].ulDefaultValue;
  61. }
  62. }
  63. m_cboxEnSvcLoc.SetCheck(GETCHECKBOXVALUEFROMREG(m_binNumericRegistryEntries[GopPage_EnableSvcLoc].ulFieldValue));
  64. m_cboxLogAnon.SetCheck(GETCHECKBOXVALUEFROMREG(m_binNumericRegistryEntries[GopPage_LogAnonymous].ulFieldValue));
  65. m_cboxEnWais.SetCheck(GETCHECKBOXVALUEFROMREG(m_binNumericRegistryEntries[GopPage_CheckForWAISDB].ulFieldValue));
  66. m_bSetChanged = TRUE; // Any more changes come from the user
  67. return TRUE; // return TRUE unless you set the focus to a control
  68. // EXCEPTION: OCX Property Pages should return FALSE
  69. }
  70. void CGOPGENP1::OnEnsvclocdata1()
  71. {
  72. // TODO: Add your control notification handler code here
  73. if (m_bSetChanged) {
  74. m_binNumericRegistryEntries[GopPage_EnableSvcLoc].bIsChanged = TRUE;
  75. m_binNumericRegistryEntries[GopPage_EnableSvcLoc].ulFieldValue =
  76. GETREGVALUEFROMCHECKBOX(m_cboxEnSvcLoc.GetCheck());
  77. m_bIsDirty = TRUE;
  78. SetModified(TRUE);
  79. }
  80. }
  81. void CGOPGENP1::OnEnwaisdata1()
  82. {
  83. // TODO: Add your control notification handler code here
  84. if (m_bSetChanged) {
  85. m_binNumericRegistryEntries[GopPage_CheckForWAISDB].bIsChanged = TRUE;
  86. m_binNumericRegistryEntries[GopPage_CheckForWAISDB].ulFieldValue =
  87. GETREGVALUEFROMCHECKBOX(m_cboxEnWais.GetCheck());
  88. m_bIsDirty = TRUE;
  89. SetModified(TRUE);
  90. }
  91. }
  92. void CGOPGENP1::OnLoganondata1()
  93. {
  94. // TODO: Add your control notification handler code here
  95. if (m_bSetChanged) {
  96. m_binNumericRegistryEntries[GopPage_LogAnonymous].bIsChanged = TRUE;
  97. m_binNumericRegistryEntries[GopPage_LogAnonymous].ulFieldValue =
  98. GETREGVALUEFROMCHECKBOX(m_cboxLogAnon.GetCheck());
  99. m_bIsDirty = TRUE;
  100. SetModified(TRUE);
  101. }
  102. }
  103. void CGOPGENP1::SaveInfo()
  104. {
  105. if (m_bIsDirty) {
  106. SaveNumericInfo(m_binNumericRegistryEntries, GopPage_TotalNumRegEntries);
  107. }
  108. CGenPage::SaveInfo();
  109. }