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.

112 lines
2.7 KiB

  1. // ConfigResultsView.cpp: implementation of the CConfigResultsView class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #include "stdafx.h"
  5. #include "snapin.h"
  6. #include "ConfigResultsView.h"
  7. #include "HMListViewColumn.h"
  8. #ifdef _DEBUG
  9. #undef THIS_FILE
  10. static char THIS_FILE[]=__FILE__;
  11. #define new DEBUG_NEW
  12. #endif
  13. IMPLEMENT_DYNCREATE(CConfigResultsView,CSplitPaneResultsView)
  14. //////////////////////////////////////////////////////////////////////
  15. // Construction/Destruction
  16. //////////////////////////////////////////////////////////////////////
  17. CConfigResultsView::CConfigResultsView()
  18. {
  19. }
  20. CConfigResultsView::~CConfigResultsView()
  21. {
  22. Destroy();
  23. }
  24. //////////////////////////////////////////////////////////////////////
  25. // Create/Destroy
  26. //////////////////////////////////////////////////////////////////////
  27. bool CConfigResultsView::Create(CScopePaneItem* pOwnerItem)
  28. {
  29. TRACEX(_T("CConfigResultsView::Create\n"));
  30. TRACEARGn(pOwnerItem);
  31. if( ! CSplitPaneResultsView::Create(pOwnerItem) )
  32. {
  33. TRACE(_T("FAILED : CSplitPaneResultsView::Create failed.\n"));
  34. return false;
  35. }
  36. // add the upper columns
  37. CHMListViewColumn* pColumn = NULL;
  38. CString sTitle;
  39. DWORD dwFormat = LVCFMT_LEFT;
  40. // name
  41. pColumn = new CHMListViewColumn;
  42. sTitle.LoadString(IDS_STRING_NAME);
  43. pColumn->Create(this,sTitle,75,dwFormat);
  44. pColumn->SetToUpperPane();
  45. AddColumn(pColumn);
  46. // last message
  47. pColumn = new CHMListViewColumn;
  48. sTitle.LoadString(IDS_STRING_LAST_MESSAGE);
  49. pColumn->Create(this,sTitle,125,dwFormat);
  50. pColumn->SetToUpperPane();
  51. AddColumn(pColumn);
  52. // comment
  53. pColumn = new CHMListViewColumn;
  54. sTitle.LoadString(IDS_STRING_COMMENT);
  55. pColumn->Create(this,sTitle,125,dwFormat);
  56. pColumn->SetToUpperPane();
  57. AddColumn(pColumn);
  58. // add the lower columns
  59. // Severity
  60. pColumn = new CHMListViewColumn;
  61. sTitle.LoadString(IDS_STRING_SEVERITY);
  62. pColumn->Create(this,sTitle,75,dwFormat);
  63. pColumn->SetToLowerPane();
  64. AddColumn(pColumn);
  65. // Date/Time
  66. pColumn = new CHMListViewColumn;
  67. sTitle.LoadString(IDS_STRING_DATETIME);
  68. pColumn->Create(this,sTitle,175,dwFormat);
  69. pColumn->SetToLowerPane();
  70. AddColumn(pColumn);
  71. // Component
  72. pColumn = new CHMListViewColumn;
  73. sTitle.LoadString(IDS_STRING_DATA_POINT);
  74. pColumn->Create(this,sTitle,125,dwFormat);
  75. pColumn->SetToLowerPane();
  76. AddColumn(pColumn);
  77. // System
  78. pColumn = new CHMListViewColumn;
  79. sTitle.LoadString(IDS_STRING_SYSTEM);
  80. pColumn->Create(this,sTitle,75,dwFormat);
  81. pColumn->SetToLowerPane();
  82. AddColumn(pColumn);
  83. // Message
  84. pColumn = new CHMListViewColumn;
  85. sTitle.LoadString(IDS_STRING_MESSAGE);
  86. pColumn->Create(this,sTitle,75,dwFormat);
  87. pColumn->SetToLowerPane();
  88. AddColumn(pColumn);
  89. return true;
  90. }