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.

103 lines
2.7 KiB

  1. // gopadvp1.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ISAdmin.h"
  5. #include "gopadvp1.h"
  6. #ifdef _DEBUG
  7. #undef THIS_FILE
  8. static char BASED_CODE THIS_FILE[] = __FILE__;
  9. #endif
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CGOPADVP1 dialog
  12. IMPLEMENT_DYNCREATE(CGOPADVP1, CGenPage)
  13. CGOPADVP1::CGOPADVP1(): CGenPage(CGOPADVP1::IDD)
  14. {
  15. //{{AFX_DATA_INIT(CGOPADVP1)
  16. m_ulGopDbgFlags = 0;
  17. //}}AFX_DATA_INIT
  18. }
  19. CGOPADVP1::~CGOPADVP1()
  20. {
  21. }
  22. void CGOPADVP1::DoDataExchange(CDataExchange* pDX)
  23. {
  24. CGenPage::DoDataExchange(pDX);
  25. //{{AFX_DATA_MAP(CGOPADVP1)
  26. DDX_Control(pDX, IDC_GOPDBGFLAGSDATA1, m_editGopDbgFlags);
  27. DDX_TexttoHex(pDX, IDC_GOPDBGFLAGSDATA1, m_ulGopDbgFlags);
  28. //}}AFX_DATA_MAP
  29. }
  30. BEGIN_MESSAGE_MAP(CGOPADVP1, CGenPage)
  31. //{{AFX_MSG_MAP(CGOPADVP1)
  32. ON_EN_CHANGE(IDC_GOPDBGFLAGSDATA1, OnChangeGopdbgflagsdata1)
  33. //}}AFX_MSG_MAP
  34. END_MESSAGE_MAP()
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CGOPADVP1 message handlers
  37. BOOL CGOPADVP1::OnInitDialog()
  38. {
  39. CGenPage::OnInitDialog();
  40. int i;
  41. // TODO: Add extra initialization here
  42. for (i = 0; i < AdvGopPage_TotalNumRegEntries; i++) {
  43. m_binNumericRegistryEntries[i].bIsChanged = FALSE;
  44. m_binNumericRegistryEntries[i].ulMultipleFactor = 1;
  45. }
  46. m_binNumericRegistryEntries[AdvGopPage_DebugFlags].strFieldName = _T(DEBUGFLAGSNAME);
  47. m_binNumericRegistryEntries[AdvGopPage_DebugFlags].ulDefaultValue = DEFAULTDEBUGFLAGS;
  48. for (i = 0; i < AdvGopPage_TotalNumRegEntries; i++) {
  49. if (m_rkMainKey->QueryValue(m_binNumericRegistryEntries[i].strFieldName,
  50. m_binNumericRegistryEntries[i].ulFieldValue) != ERROR_SUCCESS) {
  51. m_binNumericRegistryEntries[i].ulFieldValue = m_binNumericRegistryEntries[i].ulDefaultValue;
  52. }
  53. }
  54. m_editGopDbgFlags.LimitText(8);
  55. m_ulGopDbgFlags = m_binNumericRegistryEntries[AdvGopPage_DebugFlags].ulFieldValue;
  56. UpdateData(FALSE); // Force Edit box(es) to pick up value(s)
  57. m_bSetChanged = TRUE; // Any more changes come from the user
  58. return TRUE; // return TRUE unless you set the focus to a control
  59. // EXCEPTION: OCX Property Pages should return FALSE
  60. }
  61. void CGOPADVP1::OnChangeGopdbgflagsdata1()
  62. {
  63. // TODO: Add your control notification handler code here
  64. if (m_bSetChanged) {
  65. m_binNumericRegistryEntries[AdvGopPage_DebugFlags].bIsChanged = TRUE;
  66. m_bIsDirty = TRUE;
  67. SetModified(TRUE);
  68. }
  69. }
  70. void CGOPADVP1::SaveInfo()
  71. {
  72. if (m_bIsDirty) {
  73. m_binNumericRegistryEntries[AdvGopPage_DebugFlags].ulFieldValue = m_ulGopDbgFlags;
  74. SaveNumericInfo(m_binNumericRegistryEntries, AdvGopPage_TotalNumRegEntries);
  75. }
  76. CGenPage::SaveInfo();
  77. }