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.

163 lines
2.8 KiB

  1. /*++
  2. Copyright (C) 1997-2001 Microsoft Corporation
  3. Module Name:
  4. Abstract:
  5. History:
  6. --*/
  7. // ValuePg.cpp : implementation file
  8. //
  9. #include "stdafx.h"
  10. #include "wmitest.h"
  11. #include "OpWrap.h"
  12. #include "ValuePg.h"
  13. #ifdef _DEBUG
  14. #define new DEBUG_NEW
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CValuePg property page
  20. IMPLEMENT_DYNCREATE(CValuePg, CPropertyPage)
  21. CValuePg::CValuePg() :
  22. CPropertyPage(CValuePg::IDD),
  23. m_bFirst(TRUE)
  24. {
  25. //{{AFX_DATA_INIT(CValuePg)
  26. // NOTE: the ClassWizard will add member initialization here
  27. //}}AFX_DATA_INIT
  28. }
  29. CValuePg::~CValuePg()
  30. {
  31. }
  32. void CValuePg::DoDataExchange(CDataExchange* pDX)
  33. {
  34. if (!pDX->m_bSaveAndValidate)
  35. m_propUtil.Init(this);
  36. m_propUtil.DoDataExchange(pDX);
  37. }
  38. BEGIN_MESSAGE_MAP(CValuePg, CPropertyPage)
  39. //{{AFX_MSG_MAP(CValuePg)
  40. ON_BN_CLICKED(IDC_NULL, OnNull)
  41. ON_BN_CLICKED(IDC_ADD, OnAdd)
  42. ON_BN_CLICKED(IDC_DELETE, OnDelete)
  43. ON_BN_CLICKED(IDC_UP, OnUp)
  44. ON_BN_CLICKED(IDC_DOWN, OnDown)
  45. ON_LBN_SELCHANGE(IDC_ARRAY_VALUES, OnSelchangeValueArray)
  46. ON_BN_CLICKED(IDC_EDIT, OnEdit)
  47. ON_BN_CLICKED(IDC_ARRAY, OnArray)
  48. ON_WM_PAINT()
  49. ON_CBN_SELCHANGE(IDC_TYPE, OnSelchangeType)
  50. ON_BN_CLICKED(IDC_EDIT_OBJ, OnEditObj)
  51. ON_BN_CLICKED(IDC_CLEAR, OnClear)
  52. ON_LBN_DBLCLK(IDC_ARRAY_VALUES, OnDblclkArrayValues)
  53. //}}AFX_MSG_MAP
  54. END_MESSAGE_MAP()
  55. /////////////////////////////////////////////////////////////////////////////
  56. // CValuePg message handlers
  57. void CValuePg::OnNull()
  58. {
  59. m_propUtil.OnNull();
  60. }
  61. void CValuePg::OnAdd()
  62. {
  63. m_propUtil.OnAdd();
  64. }
  65. void CValuePg::OnEdit()
  66. {
  67. m_propUtil.OnEdit();
  68. }
  69. void CValuePg::OnDelete()
  70. {
  71. m_propUtil.OnDelete();
  72. }
  73. void CValuePg::OnUp()
  74. {
  75. m_propUtil.OnUp();
  76. }
  77. void CValuePg::OnDown()
  78. {
  79. m_propUtil.OnDown();
  80. }
  81. void CValuePg::OnSelchangeValueArray()
  82. {
  83. m_propUtil.OnSelchangeValueArray();
  84. }
  85. void CValuePg::OnArray()
  86. {
  87. m_propUtil.OnArray();
  88. }
  89. void CValuePg::OnPaint()
  90. {
  91. CPaintDC dc(this); // device context for painting
  92. // This is a total pain!!! I tried putting this in WM_INIT_DIALOG and
  93. // DoDataExchange but neither one worked.
  94. /*
  95. if (m_bFirst)
  96. {
  97. m_propUtil.OnInitDialog();
  98. m_bFirst = FALSE;
  99. }
  100. */
  101. // Do not call CPropertyPage::OnPaint() for painting messages
  102. }
  103. void CValuePg::OnSelchangeType()
  104. {
  105. m_propUtil.OnSelchangeType();
  106. }
  107. void CValuePg::OnEditObj()
  108. {
  109. m_propUtil.OnEditEmbedded();
  110. }
  111. void CValuePg::OnClear()
  112. {
  113. m_propUtil.OnClearEmbedded();
  114. }
  115. void CValuePg::OnDblclkArrayValues()
  116. {
  117. m_propUtil.OnDblclkArrayValues();
  118. }
  119. BOOL CValuePg::OnInitDialog()
  120. {
  121. CPropertyPage::OnInitDialog();
  122. return m_propUtil.OnInitDialog();
  123. //return TRUE; // return TRUE unless you set the focus to a control
  124. // EXCEPTION: OCX Property Pages should return FALSE
  125. }