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.

161 lines
3.6 KiB

  1. //
  2. // Driver Verifier UI
  3. // Copyright (c) Microsoft Corporation, 1999
  4. //
  5. //
  6. //
  7. // module: GCntPage.h
  8. // author: DMihai
  9. // created: 11/1/00
  10. //
  11. // Description:
  12. //
  13. #if !defined(AFX_GCNTPAGE_H__45E55738_381A_49A1_B2A7_6DD5B0BBFF9C__INCLUDED_)
  14. #define AFX_GCNTPAGE_H__45E55738_381A_49A1_B2A7_6DD5B0BBFF9C__INCLUDED_
  15. #if _MSC_VER > 1000
  16. #pragma once
  17. #endif // _MSC_VER > 1000
  18. // GCntPage.h : header file
  19. //
  20. #include "VerfPage.h"
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CGlobalCountPage dialog
  23. class CGlobalCountPage : public CVerifierPropertyPage
  24. {
  25. DECLARE_DYNCREATE(CGlobalCountPage)
  26. public:
  27. //
  28. // Construction
  29. //
  30. CGlobalCountPage();
  31. ~CGlobalCountPage();
  32. public:
  33. //
  34. // Methods
  35. //
  36. VOID SetParentSheet( CPropertySheet *pParentSheet )
  37. {
  38. m_pParentSheet = pParentSheet;
  39. ASSERT( m_pParentSheet != NULL );
  40. }
  41. protected:
  42. VOID SetupListHeader();
  43. VOID FillTheList();
  44. VOID RefreshTheList();
  45. VOID SortTheList();
  46. VOID AddCounterInList( INT nItemData,
  47. ULONG uIdResourceString,
  48. SIZE_T sizeValue );
  49. SIZE_T GetCounterValue( INT_PTR nCounterIndex );
  50. BOOL GetCounterName( LPARAM lItemData,
  51. TCHAR *szCounterName,
  52. ULONG uCounterNameBufferLen );
  53. VOID RefreshInfo();
  54. VOID UpdateCounterValueInList( INT nItemIndex,
  55. SIZE_T sizeValue );
  56. VOID OnRefreshTimerChanged();
  57. BOOL CheckAndShowPoolCoverageWarning();
  58. static int CALLBACK CounterValueCmpFunc(
  59. LPARAM lParam1,
  60. LPARAM lParam2,
  61. LPARAM lParamSort);
  62. static int CALLBACK CounterNameCmpFunc(
  63. LPARAM lParam1,
  64. LPARAM lParam2,
  65. LPARAM lParamSort);
  66. protected:
  67. //
  68. // Data
  69. //
  70. CPropertySheet *m_pParentSheet;
  71. //
  72. // Dialog Data
  73. //
  74. INT m_nSortColumnIndex; // counter name (0) or counter value (1)
  75. BOOL m_bAscendSortName; // sort ascendent the counter names
  76. BOOL m_bAscendSortValue; // sort ascendent the counter values
  77. UINT_PTR m_uTimerHandler; // timer handler, returned by SetTimer()
  78. //
  79. // Runtime data (obtained from the kernel)
  80. //
  81. CRuntimeVerifierData m_RuntimeVerifierData;
  82. //
  83. // Dialog data
  84. //
  85. //{{AFX_DATA(CGlobalCountPage)
  86. enum { IDD = IDD_GLOBAL_COUNTERS_PAGE };
  87. CListCtrl m_CountersList;
  88. CStatic m_NextDescription;
  89. //}}AFX_DATA
  90. protected:
  91. //
  92. // Overrides
  93. //
  94. //
  95. // All the property pages derived from this class should
  96. // provide these methods.
  97. //
  98. virtual ULONG GetDialogId() const { return IDD; }
  99. //
  100. // ClassWizard generate virtual function overrides
  101. //
  102. //{{AFX_VIRTUAL(CGlobalCountPage)
  103. public:
  104. virtual BOOL OnSetActive();
  105. virtual LRESULT OnWizardNext();
  106. protected:
  107. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  108. //}}AFX_VIRTUAL
  109. // Implementation
  110. protected:
  111. // Generated message map functions
  112. //{{AFX_MSG(CGlobalCountPage)
  113. virtual BOOL OnInitDialog();
  114. afx_msg VOID OnTimer(UINT nIDEvent);
  115. afx_msg void OnColumnclickGlobcList(NMHDR* pNMHDR, LRESULT* pResult);
  116. afx_msg LONG OnHelp( WPARAM wParam, LPARAM lParam );
  117. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  118. //}}AFX_MSG
  119. DECLARE_MESSAGE_MAP()
  120. };
  121. //{{AFX_INSERT_LOCATION}}
  122. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  123. #endif // !defined(AFX_GCNTPAGE_H__45E55738_381A_49A1_B2A7_6DD5B0BBFF9C__INCLUDED_)