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.

127 lines
4.0 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (C) Microsoft Corporation
  4. //
  5. // Module Name:
  6. //
  7. // IASBooleanEditorPage.cpp
  8. //
  9. // Abstract:
  10. //
  11. // Implementation file for the CIASBooleanEditorPage class.
  12. //
  13. //////////////////////////////////////////////////////////////////////////////
  14. #include "Precompiled.h"
  15. #include "IASBooleanEditorPage.h"
  16. #include "iashelper.h"
  17. #include "dlgcshlp.h"
  18. IMPLEMENT_DYNCREATE(CIASBooleanEditorPage, CHelpDialog)
  19. BEGIN_MESSAGE_MAP(CIASBooleanEditorPage, CHelpDialog)
  20. //{{AFX_MSG_MAP(CIASBooleanEditorPage)
  21. ON_BN_CLICKED(IDC_RADIO_TRUE, OnRadioTrue)
  22. ON_BN_CLICKED(IDC_RADIO_FALSE, OnRadioFalse)
  23. //}}AFX_MSG_MAP
  24. END_MESSAGE_MAP()
  25. //////////////////////////////////////////////////////////////////////////////
  26. // CIASBooleanEditorPage::CIASBooleanEditorPage
  27. //////////////////////////////////////////////////////////////////////////////
  28. CIASBooleanEditorPage::CIASBooleanEditorPage()
  29. :CHelpDialog(CIASBooleanEditorPage::IDD)
  30. {
  31. TRACE(_T("CIASBooleanEditorPage::CIASBooleanEditorPage\n"));
  32. //{{AFX_DATA_INIT(CIASBooleanEditorPage)
  33. m_strAttrFormat = _T("");
  34. m_strAttrName = _T("");
  35. m_strAttrType = _T("");
  36. m_bValue = true;
  37. //}}AFX_DATA_INIT
  38. //
  39. // set the initializing flag -- we shouldn't call custom data verification
  40. // routine when initializing, because otherwise we will report an error
  41. // for an attribute whose value has never been initialized
  42. //
  43. m_fInitializing = TRUE;
  44. }
  45. //////////////////////////////////////////////////////////////////////////////
  46. // CIASBooleanEditorPage::OnRadioTrue
  47. //////////////////////////////////////////////////////////////////////////////
  48. void CIASBooleanEditorPage::OnRadioTrue()
  49. {
  50. m_bValue = true;
  51. return;
  52. }
  53. //////////////////////////////////////////////////////////////////////////////
  54. // CIASBooleanEditorPage::OnRadioFalse
  55. //////////////////////////////////////////////////////////////////////////////
  56. void CIASBooleanEditorPage::OnRadioFalse()
  57. {
  58. m_bValue = false;
  59. return;
  60. }
  61. //////////////////////////////////////////////////////////////////////////////
  62. // CIASBooleanEditorPage::~CIASBooleanEditorPage
  63. ////////////////////////////////////////////////////////////////////////////////
  64. CIASBooleanEditorPage::~CIASBooleanEditorPage()
  65. {
  66. TRACE(_T("CIASBooleanEditorPage::~CIASBooleanEditorPage\n"));
  67. }
  68. //////////////////////////////////////////////////////////////////////////////
  69. // CIASBooleanEditorPage::OnInitDialog
  70. ////////////////////////////////////////////////////////////////////////////////
  71. BOOL CIASBooleanEditorPage::OnInitDialog()
  72. {
  73. CHelpDialog::OnInitDialog();
  74. ::SendMessage(::GetDlgItem(m_hWnd,IDC_RADIO_TRUE),
  75. BM_SETCHECK,
  76. (m_bValue)? BST_CHECKED:BST_UNCHECKED , 0 );
  77. ::SendMessage(::GetDlgItem(m_hWnd,IDC_RADIO_FALSE),
  78. BM_SETCHECK,
  79. (m_bValue)? BST_UNCHECKED:BST_CHECKED , 0 );
  80. return TRUE;
  81. }
  82. //////////////////////////////////////////////////////////////////////////////
  83. // CIASBooleanEditorPage::DoDataExchange
  84. //////////////////////////////////////////////////////////////////////////////
  85. void CIASBooleanEditorPage::DoDataExchange(CDataExchange* pDX)
  86. {
  87. TRACE(_T("CIASBooleanEditorPage::DoDataExchange\n"));
  88. CHelpDialog::DoDataExchange(pDX);
  89. //{{AFX_DATA_MAP(CIASBooleanEditorPage)
  90. DDX_Text(pDX, IDC_IAS_STATIC_ATTRFORMAT, m_strAttrFormat);
  91. DDX_Text(pDX, IDC_IAS_STATIC_ATTRNAME, m_strAttrName);
  92. DDX_Text(pDX, IDC_IAS_STATIC_ATTRTYPE, m_strAttrType);
  93. //}}AFX_DATA_MAP
  94. if (m_fInitializing)
  95. {
  96. //
  97. // set the initializing flag -- we shouldn't call custom data verification
  98. // routine when initializing, because otherwise we will report an error
  99. // for an attribute whose value has never been initialized
  100. //
  101. m_fInitializing = FALSE;
  102. }
  103. }
  104. /////////////////////////////////////////////////////////////////////////////
  105. // CIASBooleanEditorPage message handlers